summaryrefslogtreecommitdiff
path: root/src/pgm_receiver.hpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-02-16 10:05:01 +0900
committerMartin Sustrik <sustrik@250bpm.com>2012-02-16 10:05:01 +0900
commit2df873a435ff139cf9d1b10b666d75e6dc6da442 (patch)
tree042b0a349ca84919041fb37df7e5a3b7195d065d /src/pgm_receiver.hpp
parentb67f88a7d6322a293ac3e3be9d6df9f358509221 (diff)
Timers identified by dynamically generated handles
Timers are not longer identified by hard-wired IDs. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/pgm_receiver.hpp')
-rw-r--r--src/pgm_receiver.hpp11
1 files changed, 4 insertions, 7 deletions
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&);
};