30 #ifndef __ZMQ_PGM_RECEIVER_HPP_INCLUDED__ 31 #define __ZMQ_PGM_RECEIVER_HPP_INCLUDED__ 33 #include "platform.hpp" 35 #if defined ZMQ_HAVE_OPENPGM 37 #ifdef ZMQ_HAVE_WINDOWS 56 class pgm_receiver_t :
public io_object_t,
public i_engine
64 int init (
bool udp_encapsulation_,
const char *network_);
70 void restart_input ();
71 void restart_output ();
72 void zap_msg_available () {}
76 void timer_event (
int token);
85 int process_input (v1_decoder_t *
decoder);
89 void drop_subscriptions ();
92 enum {rx_timer_id = 0xa1};
108 bool operator () (
const pgm_tsi_t <si,
109 const pgm_tsi_t &rtsi)
const 111 uint32_t ll[2], rl[2];
112 memcpy (ll, <si,
sizeof (ll));
113 memcpy (rl, &rtsi,
sizeof (rl));
114 return (ll[0] < rl[0]) || (ll[0] == rl[0] && ll[1] < rl[1]);
118 typedef std::map <pgm_tsi_t, peer_info_t, tsi_comp> peers_t;
122 pgm_socket_t pgm_socket;
130 const pgm_tsi_t *active_tsi;
136 const unsigned char *inpos;
139 handle_t socket_handle;
142 handle_t pipe_handle;
144 pgm_receiver_t (
const pgm_receiver_t&);
145 const pgm_receiver_t &operator = (
const pgm_receiver_t&);
static uint8_t decoder[96]