mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-30 21:50:49 +01:00
Allow blocking while connect() is completing
This patch, salvaged from a trainwreck accidental merge earlier, adds a new sockopt, ZMQ_DELAY_ATTACH_ON_CONNECT which prevents a end point being available to push messages to until it has fully connected, making connect work more like bind. This also applies to reconnecting sockets, which may cause message loss of in-queue messages, so it is sensible to use this in conjunction with a low HWM and potentially an alternative acknowledgement path. Notes on most of the individual commits can be found the repository log.
This commit is contained in:
@@ -103,6 +103,9 @@ namespace zmq
|
||||
|
||||
// Pipe connecting the session to its socket.
|
||||
zmq::pipe_t *pipe;
|
||||
|
||||
// This set is added to with pipes we are disconnecting, but haven't yet completed
|
||||
std::set<pipe_t *> incomplete_pipes;
|
||||
|
||||
// This flag is true if the remainder of the message being processed
|
||||
// is still in the in pipe.
|
||||
|
||||
Reference in New Issue
Block a user