diff options
Diffstat (limited to 'src/xreq.cpp')
-rw-r--r-- | src/xreq.cpp | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/src/xreq.cpp b/src/xreq.cpp index 2fda2c1..4a6e67e 100644 --- a/src/xreq.cpp +++ b/src/xreq.cpp @@ -28,20 +28,18 @@ zmq::xreq_t::xreq_t (class ctx_t *parent_, uint32_t tid_) : lb (this) { options.type = ZMQ_XREQ; - options.requires_in = true; - options.requires_out = true; } zmq::xreq_t::~xreq_t () { } -void zmq::xreq_t::xattach_pipes (class reader_t *inpipe_, - class writer_t *outpipe_, const blob_t &peer_identity_) +void zmq::xreq_t::xattach_pipe (class pipe_t *pipe_, const blob_t &peer_identity_) { - zmq_assert (inpipe_ && outpipe_); - fq.attach (inpipe_); - lb.attach (outpipe_); + zmq_assert (pipe_); + pipe_->set_event_sink (this); + fq.attach (pipe_); + lb.attach (pipe_); } void zmq::xreq_t::process_term (int linger_) @@ -71,3 +69,19 @@ bool zmq::xreq_t::xhas_out () return lb.has_out (); } +void zmq::xreq_t::read_activated (pipe_t *pipe_) +{ + fq.activated (pipe_); +} + +void zmq::xreq_t::write_activated (pipe_t *pipe_) +{ + lb.activated (pipe_); +} + +void zmq::xreq_t::terminated (pipe_t *pipe_) +{ + fq.terminated (pipe_); + lb.terminated (pipe_); +} + |