summaryrefslogtreecommitdiff
path: root/src/pgm_sender.cpp
diff options
context:
space:
mode:
authormalosek <malosek@fastmq.com>2010-01-05 11:22:14 +0100
committermalosek <malosek@fastmq.com>2010-01-05 11:22:14 +0100
commit11fec367d1a13c3f0248f8542eb805b8d9571685 (patch)
treea7767f6923eba93ccecc2d2cc6e0f9beda43c669 /src/pgm_sender.cpp
parent472ddf8de2c93f750831d52b5473cdbed1db51e8 (diff)
added pending event fd handling by the pgm_sender
Diffstat (limited to 'src/pgm_sender.cpp')
-rw-r--r--src/pgm_sender.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/pgm_sender.cpp b/src/pgm_sender.cpp
index 010d99f..3f08d8e 100644
--- a/src/pgm_sender.cpp
+++ b/src/pgm_sender.cpp
@@ -54,6 +54,8 @@ int zmq::pgm_sender_t::init (bool udp_encapsulation_, const char *network_)
out_buffer_size = pgm_socket.get_max_tsdu_size ();
out_buffer = (unsigned char*) malloc (out_buffer_size);
zmq_assert (out_buffer);
+
+ return rc;
}
void zmq::pgm_sender_t::plug (i_inout *inout_)
@@ -62,20 +64,24 @@ void zmq::pgm_sender_t::plug (i_inout *inout_)
int downlink_socket_fd = 0;
int uplink_socket_fd = 0;
int rdata_notify_fd = 0;
+ int pending_notify_fd = 0;
encoder.set_inout (inout_);
// Fill fds from PGM transport and add them to the poller.
pgm_socket.get_sender_fds (&downlink_socket_fd, &uplink_socket_fd,
- &rdata_notify_fd);
+ &rdata_notify_fd, &pending_notify_fd);
+
handle = add_fd (downlink_socket_fd);
uplink_handle = add_fd (uplink_socket_fd);
rdata_notify_handle = add_fd (rdata_notify_fd);
+ pending_notify_handle = add_fd (pending_notify_fd);
// Set POLLIN. We wont never want to stop polling for uplink = we never
// want to stop porocess NAKs.
set_pollin (uplink_handle);
set_pollin (rdata_notify_handle);
+ set_pollin (pending_notify_handle);
// Set POLLOUT for downlink_socket_handle.
set_pollout (handle);
@@ -86,6 +92,7 @@ void zmq::pgm_sender_t::unplug ()
rm_fd (handle);
rm_fd (uplink_handle);
rm_fd (rdata_notify_handle);
+ rm_fd (pending_notify_handle);
encoder.set_inout (NULL);
}