mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-03 12:58:05 +01:00
non-immediate_connect functionality removed
It was used only by ROUTER socket. After its removal it became obsolete. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
This commit is contained in:
parent
364839f3e6
commit
ba67eff167
@ -40,7 +40,6 @@ zmq::options_t::options_t () :
|
||||
maxmsgsize (-1),
|
||||
rcvtimeo (-1),
|
||||
sndtimeo (-1),
|
||||
immediate_connect (true),
|
||||
delay_on_close (true),
|
||||
delay_on_disconnect (true),
|
||||
filter (false)
|
||||
|
@ -79,12 +79,6 @@ namespace zmq
|
||||
int rcvtimeo;
|
||||
int sndtimeo;
|
||||
|
||||
// If true, when connecting, pipes are created immediately without
|
||||
// waiting for the connection to be established. That way the socket
|
||||
// is not aware of the peer's identity, however, it is able to send
|
||||
// messages straight away.
|
||||
bool immediate_connect;
|
||||
|
||||
// If true, session reads all the pending messages from the pipe and
|
||||
// sends them to the network when socket is closed.
|
||||
bool delay_on_close;
|
||||
|
@ -445,25 +445,19 @@ int zmq::socket_base_t::connect (const char *addr_)
|
||||
io_thread, this, options, protocol.c_str (), address.c_str ());
|
||||
alloc_assert (session);
|
||||
|
||||
// If 'immediate connect' feature is required, we'll create the pipes
|
||||
// to the session straight away. Otherwise, they'll be created by the
|
||||
// session once the connection is established.
|
||||
if (options.immediate_connect) {
|
||||
// Create a bi-directional pipe.
|
||||
object_t *parents [2] = {this, session};
|
||||
pipe_t *pipes [2] = {NULL, NULL};
|
||||
int hwms [2] = {options.sndhwm, options.rcvhwm};
|
||||
bool delays [2] = {options.delay_on_disconnect, options.delay_on_close};
|
||||
rc = pipepair (parents, pipes, hwms, delays);
|
||||
errno_assert (rc == 0);
|
||||
|
||||
// Create a bi-directional pipe.
|
||||
object_t *parents [2] = {this, session};
|
||||
pipe_t *pipes [2] = {NULL, NULL};
|
||||
int hwms [2] = {options.sndhwm, options.rcvhwm};
|
||||
bool delays [2] = {options.delay_on_disconnect, options.delay_on_close};
|
||||
int rc = pipepair (parents, pipes, hwms, delays);
|
||||
errno_assert (rc == 0);
|
||||
// Attach local end of the pipe to the socket object.
|
||||
attach_pipe (pipes [0], blob_t ());
|
||||
|
||||
// Attach local end of the pipe to the socket object.
|
||||
attach_pipe (pipes [0], blob_t ());
|
||||
|
||||
// Attach remote end of the pipe to the session object later on.
|
||||
session->attach_pipe (pipes [1]);
|
||||
}
|
||||
// Attach remote end of the pipe to the session object later on.
|
||||
session->attach_pipe (pipes [1]);
|
||||
|
||||
// Activate the session. Make it a child of this socket.
|
||||
launch_child (session);
|
||||
|
Loading…
x
Reference in New Issue
Block a user