mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-29 12:18:04 +01:00
Move the pipe termination code to socket_base_t
So far, the pipe termination code was spread among socket type classes, fair queuer, load balancer, etc. This patch moves all the associated logic to a single place. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
This commit is contained in:
15
src/dist.hpp
15
src/dist.hpp
@@ -35,17 +35,16 @@ namespace zmq
|
||||
{
|
||||
public:
|
||||
|
||||
dist_t (class own_t *sink_);
|
||||
dist_t ();
|
||||
~dist_t ();
|
||||
|
||||
void attach (class pipe_t *pipe_);
|
||||
void terminate ();
|
||||
int send (class msg_t *msg_, int flags_);
|
||||
bool has_out ();
|
||||
|
||||
void activated (class pipe_t *pipe_);
|
||||
void terminated (class pipe_t *pipe_);
|
||||
|
||||
int send (class msg_t *msg_, int flags_);
|
||||
bool has_out ();
|
||||
|
||||
private:
|
||||
|
||||
// Write the message to the pipe. Make the pipe inactive if writing
|
||||
@@ -74,12 +73,6 @@ namespace zmq
|
||||
// True if last we are in the middle of a multipart message.
|
||||
bool more;
|
||||
|
||||
// Object to send events to.
|
||||
class own_t *sink;
|
||||
|
||||
// If true, termination process is already underway.
|
||||
bool terminating;
|
||||
|
||||
dist_t (const dist_t&);
|
||||
const dist_t &operator = (const dist_t&);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user