From 2df873a435ff139cf9d1b10b666d75e6dc6da442 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 16 Feb 2012 10:05:01 +0900 Subject: Timers identified by dynamically generated handles Timers are not longer identified by hard-wired IDs. Signed-off-by: Martin Sustrik --- src/pgm_receiver.hpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/pgm_receiver.hpp') diff --git a/src/pgm_receiver.hpp b/src/pgm_receiver.hpp index cd767f8..b8390c1 100644 --- a/src/pgm_receiver.hpp +++ b/src/pgm_receiver.hpp @@ -66,7 +66,7 @@ namespace xs // i_poll_events interface implementation. void in_event (fd_t fd_); - void timer_event (int token); + void timer_event (handle_t handle_); private: @@ -74,12 +74,6 @@ namespace xs // the pending subscriptions. void drop_subscriptions (); - // RX timeout timer ID. - enum {rx_timer_id = 0xa1}; - - // RX timer is running. - bool has_rx_timer; - // If joined is true we are already getting messages from the peer. // It it's false, we are getting data but still we haven't seen // beginning of a message. @@ -128,6 +122,9 @@ namespace xs // Poll handle associated with engine PGM waiting pipe. handle_t pipe_handle; + // Receive timer, if active, otherwise NULL. + handle_t rx_timer; + pgm_receiver_t (const pgm_receiver_t&); const pgm_receiver_t &operator = (const pgm_receiver_t&); }; -- cgit v1.2.3