12 zmq::dgram_t::dgram_t (
class ctx_t *parent_, uint32_t tid_,
int sid_) :
13 socket_base_t (parent_, tid_, sid_), _pipe (
NULL), _more_out (
false)
19 zmq::dgram_t::~dgram_t ()
24 void zmq::dgram_t::xattach_pipe (pipe_t *pipe_,
25 bool subscribe_to_all_,
26 bool locally_initiated_)
38 pipe_->terminate (
false);
41 void zmq::dgram_t::xpipe_terminated (pipe_t *pipe_)
48 void zmq::dgram_t::xread_activated (pipe_t *)
54 void zmq::dgram_t::xwrite_activated (pipe_t *)
60 int zmq::dgram_t::xsend (msg_t *msg_)
64 const int rc = msg_->close ();
72 if (!(msg_->flags () & msg_t::more)) {
78 if (msg_->flags () & msg_t::more) {
85 if (!_pipe->write (msg_)) {
90 if (!(msg_->flags () & msg_t::more))
94 _more_out = !_more_out;
97 const int rc = msg_->init ();
103 int zmq::dgram_t::xrecv (msg_t *msg_)
106 int rc = msg_->close ();
109 if (!_pipe || !_pipe->read (msg_)) {
121 bool zmq::dgram_t::xhas_in ()
126 return _pipe->check_read ();
129 bool zmq::dgram_t::xhas_out ()
134 return _pipe->check_write ();