void zmq::xpub_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_) { zmq_assert (pipe_); dist.attach (pipe_); // If subscribe_to_all_ is specified, the caller would like to subscribe // to all data on this pipe, implicitly. if (subscribe_to_all_) subscriptions.add (NULL, 0, pipe_); // if welcome message exist if (welcome_msg.size() > 0) { msg_t copy; copy.init(); copy.copy(welcome_msg); pipe_->write(©); pipe_->flush(); } // The pipe is active when attached. Let's read the subscriptions from // it, if any. xread_activated (pipe_); }
void zmq::xpub_t::xattach_pipe (pipe_t *pipe_, bool icanhasall_) { zmq_assert (pipe_); dist.attach (pipe_); // If icanhasall_ is specified, the caller would like to subscribe // to all data on this pipe, implicitly. if (icanhasall_) subscriptions.add (NULL, 0, pipe_); // The pipe is active when attached. Let's read the subscriptions from // it, if any. xread_activated (pipe_); }
void zmq::radio_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_) { LIBZMQ_UNUSED (subscribe_to_all_); zmq_assert (pipe_); // Don't delay pipe termination as there is no one // to receive the delimiter. pipe_->set_nodelay (); dist.attach (pipe_); if (subscribe_to_all_) udp_pipes.push_back (pipe_); // The pipe is active when attached. Let's read the subscriptions from // it, if any. else xread_activated (pipe_); }
void zmq::socket_base_t::read_activated (pipe_t *pipe_) { xread_activated (pipe_); }