mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-23 00:08:02 +02:00
Problem: duplicated code in stream_t & router_t
Solution: pulled up to routing_socket_base_t
This commit is contained in:
@@ -1770,6 +1770,11 @@ zmq::routing_socket_base_t::routing_socket_base_t (class ctx_t *parent_,
|
||||
{
|
||||
}
|
||||
|
||||
zmq::routing_socket_base_t::~routing_socket_base_t ()
|
||||
{
|
||||
zmq_assert (_out_pipes.empty ());
|
||||
}
|
||||
|
||||
int zmq::routing_socket_base_t::xsetsockopt (int option_,
|
||||
const void *optval_,
|
||||
size_t optvallen_)
|
||||
@@ -1807,3 +1812,10 @@ std::string zmq::routing_socket_base_t::extract_connect_routing_id ()
|
||||
_connect_routing_id.clear ();
|
||||
return res;
|
||||
}
|
||||
|
||||
void zmq::routing_socket_base_t::erase_out_pipe (pipe_t *pipe_)
|
||||
{
|
||||
out_pipes_t::iterator it = _out_pipes.find (pipe_->get_routing_id ());
|
||||
zmq_assert (it != _out_pipes.end ());
|
||||
_out_pipes.erase (it);
|
||||
}
|
||||
|
Reference in New Issue
Block a user