10 zmq::channel_t::channel_t (
class ctx_t *parent_, uint32_t tid_,
int sid_) :
11 socket_base_t (parent_, tid_, sid_,
true), _pipe (
NULL)
16 zmq::channel_t::~channel_t ()
21 void zmq::channel_t::xattach_pipe (pipe_t *pipe_,
22 bool subscribe_to_all_,
23 bool locally_initiated_)
35 pipe_->terminate (
false);
38 void zmq::channel_t::xpipe_terminated (pipe_t *pipe_)
44 void zmq::channel_t::xread_activated (pipe_t *)
50 void zmq::channel_t::xwrite_activated (pipe_t *)
56 int zmq::channel_t::xsend (msg_t *msg_)
59 if (msg_->flags () & msg_t::more) {
64 if (!_pipe || !_pipe->write (msg_)) {
72 const int rc = msg_->init ();
78 int zmq::channel_t::xrecv (msg_t *msg_)
81 int rc = msg_->close ();
94 bool read = _pipe->read (msg_);
95 while (read && msg_->flags () & msg_t::more) {
97 read = _pipe->read (msg_);
98 while (read && msg_->flags () & msg_t::more)
99 read = _pipe->read (msg_);
103 read = _pipe->read (msg_);
118 bool zmq::channel_t::xhas_in ()
123 return _pipe->check_read ();
126 bool zmq::channel_t::xhas_out ()
131 return _pipe->check_write ();