MCPcopy Create free account
hub / github.com/catboost/catboost / xattach_pipe

Method xattach_pipe

contrib/libs/zeromq/src/xpub.cpp:42–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42void zmq::xpub_t::xattach_pipe (pipe_t *pipe_,
43 bool subscribe_to_all_,
44 bool locally_initiated_)
45{
46 LIBZMQ_UNUSED (locally_initiated_);
47
48 zmq_assert (pipe_);
49 _dist.attach (pipe_);
50
51 // If subscribe_to_all_ is specified, the caller would like to subscribe
52 // to all data on this pipe, implicitly.
53 if (subscribe_to_all_)
54 _subscriptions.add (NULL, 0, pipe_);
55
56 // if welcome message exists, send a copy of it
57 if (_welcome_msg.size () > 0) {
58 msg_t copy;
59 copy.init ();
60 const int rc = copy.copy (_welcome_msg);
61 errno_assert (rc == 0);
62 const bool ok = pipe_->write (&copy);
63 zmq_assert (ok);
64 pipe_->flush ();
65 }
66
67 // The pipe is active when attached. Let's read the subscriptions from
68 // it, if any.
69 xread_activated (pipe_);
70}
71
72void zmq::xpub_t::xread_activated (pipe_t *pipe_)
73{

Callers

nothing calls this directly

Calls 7

attachMethod · 0.45
addMethod · 0.45
sizeMethod · 0.45
initMethod · 0.45
copyMethod · 0.45
writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected