diff options
Diffstat (limited to 'src/push.cpp')
-rw-r--r-- | src/push.cpp | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/push.cpp b/src/push.cpp index d6ee399..12fc8d2 100644 --- a/src/push.cpp +++ b/src/push.cpp @@ -28,19 +28,33 @@ zmq::push_t::push_t (class ctx_t *parent_, uint32_t tid_) : lb (this) { options.type = ZMQ_PUSH; - options.requires_in = false; - options.requires_out = true; } zmq::push_t::~push_t () { } -void zmq::push_t::xattach_pipes (class reader_t *inpipe_, - class writer_t *outpipe_, const blob_t &peer_identity_) +void zmq::push_t::xattach_pipe (pipe_t *pipe_, const blob_t &peer_identity_) { - zmq_assert (!inpipe_ && outpipe_); - lb.attach (outpipe_); + zmq_assert (pipe_); + pipe_->set_event_sink (this); + lb.attach (pipe_); +} + +void zmq::push_t::read_activated (pipe_t *pipe_) +{ + // There are no inbound messages in push socket. This should never happen. + zmq_assert (false); +} + +void zmq::push_t::write_activated (pipe_t *pipe_) +{ + lb.activated (pipe_); +} + +void zmq::push_t::terminated (pipe_t *pipe_) +{ + lb.terminated (pipe_); } void zmq::push_t::process_term (int linger_) |