9 zmq::client_t::client_t (
class ctx_t *parent_, uint32_t tid_,
int sid_) :
10 socket_base_t (parent_, tid_, sid_,
true)
13 options.can_send_hello_msg =
true;
14 options.can_recv_hiccup_msg =
true;
17 zmq::client_t::~client_t ()
21 void zmq::client_t::xattach_pipe (pipe_t *pipe_,
22 bool subscribe_to_all_,
23 bool locally_initiated_)
34 int zmq::client_t::xsend (msg_t *msg_)
37 if (msg_->flags () & msg_t::more) {
41 return _lb.sendpipe (msg_,
NULL);
44 int zmq::client_t::xrecv (msg_t *msg_)
46 int rc = _fq.recvpipe (msg_,
NULL);
49 while (rc == 0 && msg_->flags () & msg_t::more) {
51 rc = _fq.recvpipe (msg_,
NULL);
53 while (rc == 0 && msg_->flags () & msg_t::more)
54 rc = _fq.recvpipe (msg_,
NULL);
58 rc = _fq.recvpipe (msg_,
NULL);
64 bool zmq::client_t::xhas_in ()
69 bool zmq::client_t::xhas_out ()
71 return _lb.has_out ();
74 void zmq::client_t::xread_activated (pipe_t *pipe_)
76 _fq.activated (pipe_);
79 void zmq::client_t::xwrite_activated (pipe_t *pipe_)
81 _lb.activated (pipe_);
84 void zmq::client_t::xpipe_terminated (pipe_t *pipe_)
86 _fq.pipe_terminated (pipe_);
87 _lb.pipe_terminated (pipe_);