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

Function capture

contrib/libs/zeromq/src/proxy.cpp:57–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55#endif // ZMQ_HAVE_POLLER
56
57static int
58capture (class zmq::socket_base_t *capture_, zmq::msg_t *msg_, int more_ = 0)
59{
60 // Copy message to capture socket if any
61 if (capture_) {
62 zmq::msg_t ctrl;
63 int rc = ctrl.init ();
64 if (unlikely (rc < 0))
65 return -1;
66 rc = ctrl.copy (*msg_);
67 if (unlikely (rc < 0))
68 return -1;
69 rc = capture_->send (&ctrl, more_ ? ZMQ_SNDMORE : 0);
70 if (unlikely (rc < 0))
71 return -1;
72 }
73 return 0;
74}
75
76struct stats_socket
77{

Callers 1

forwardFunction · 0.70

Calls 3

initMethod · 0.45
copyMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected