summaryrefslogtreecommitdiff
path: root/src/pgm_sender.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-07-11 10:18:30 +0200
committerMartin Sustrik <sustrik@250bpm.com>2011-07-11 10:18:30 +0200
commitc7542981d18b13b251d5a3129f1ec7ba24aeb9a1 (patch)
tree0557b82ed908ea48c68711587c1a76c487f8f45b /src/pgm_sender.cpp
parentd7adc3f19a4c941e854552d6d7881950a69b0d23 (diff)
PGM transport reconciled with subscription forwarding
As PGM is not capable of passing subscriptions upstream, subscriptions are ignored at sub side and engine subscribes for all messages on pub side. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/pgm_sender.cpp')
-rw-r--r--src/pgm_sender.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pgm_sender.cpp b/src/pgm_sender.cpp
index 314a0b4..9b1e215 100644
--- a/src/pgm_sender.cpp
+++ b/src/pgm_sender.cpp
@@ -88,6 +88,15 @@ void zmq::pgm_sender_t::plug (io_thread_t *io_thread_, i_engine_sink *sink_)
// Set POLLOUT for downlink_socket_handle.
set_pollout (handle);
+
+ // PGM is not able to pass subscriptions upstream, thus we have no idea
+ // what messages are peers interested in. Because of that we have to
+ // subscribe for all the messages.
+ msg_t msg;
+ msg.init ();
+ bool ok = sink_->write (&msg);
+ zmq_assert (ok);
+ sink_->flush ();
}
void zmq::pgm_sender_t::unplug ()