summaryrefslogtreecommitdiff
path: root/src/lb.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-05-22 17:26:53 +0200
committerMartin Sustrik <sustrik@250bpm.com>2011-05-22 17:26:53 +0200
commitacf0b0e515515e51ad32ba7a2d147ce703579478 (patch)
treed2032009cf46c23aa0f677c2216914f718ab968a /src/lb.cpp
parent9e6b39925603f9e64db08c469bd628d7ef9465de (diff)
Introduces bi-directional pipes
So far, there was a pair of unidirectional pipes between a socket and a session (or an inproc peer). This resulted in complex problems with half-closed states and tracking which inpipe corresponds to which outpipe. This patch doesn't add any functionality in itself, but is essential for further work on features like subscription forwarding. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/lb.cpp')
-rw-r--r--src/lb.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lb.cpp b/src/lb.cpp
index 8eb9157..2ba902a 100644
--- a/src/lb.cpp
+++ b/src/lb.cpp
@@ -39,10 +39,8 @@ zmq::lb_t::~lb_t ()
zmq_assert (pipes.empty ());
}
-void zmq::lb_t::attach (writer_t *pipe_)
+void zmq::lb_t::attach (pipe_t *pipe_)
{
- pipe_->set_event_sink (this);
-
pipes.push_back (pipe_);
pipes.swap (active, pipes.size () - 1);
active++;
@@ -63,7 +61,7 @@ void zmq::lb_t::terminate ()
pipes [i]->terminate ();
}
-void zmq::lb_t::terminated (writer_t *pipe_)
+void zmq::lb_t::terminated (pipe_t *pipe_)
{
pipes_t::size_type index = pipes.index (pipe_);
@@ -85,7 +83,7 @@ void zmq::lb_t::terminated (writer_t *pipe_)
sink->unregister_term_ack ();
}
-void zmq::lb_t::activated (writer_t *pipe_)
+void zmq::lb_t::activated (pipe_t *pipe_)
{
// Move the pipe to the list of active pipes.
pipes.swap (pipes.index (pipe_), active);