mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-28 19:52:00 +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:
@@ -40,7 +40,6 @@ zmq::options_t::options_t () :
|
|||||||
maxmsgsize (-1),
|
maxmsgsize (-1),
|
||||||
rcvtimeo (-1),
|
rcvtimeo (-1),
|
||||||
sndtimeo (-1),
|
sndtimeo (-1),
|
||||||
immediate_connect (true),
|
|
||||||
delay_on_close (true),
|
delay_on_close (true),
|
||||||
delay_on_disconnect (true),
|
delay_on_disconnect (true),
|
||||||
filter (false)
|
filter (false)
|
||||||
|
|||||||
@@ -79,12 +79,6 @@ namespace zmq
|
|||||||
int rcvtimeo;
|
int rcvtimeo;
|
||||||
int sndtimeo;
|
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
|
// If true, session reads all the pending messages from the pipe and
|
||||||
// sends them to the network when socket is closed.
|
// sends them to the network when socket is closed.
|
||||||
bool delay_on_close;
|
bool delay_on_close;
|
||||||
|
|||||||
@@ -445,17 +445,12 @@ int zmq::socket_base_t::connect (const char *addr_)
|
|||||||
io_thread, this, options, protocol.c_str (), address.c_str ());
|
io_thread, this, options, protocol.c_str (), address.c_str ());
|
||||||
alloc_assert (session);
|
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.
|
// Create a bi-directional pipe.
|
||||||
object_t *parents [2] = {this, session};
|
object_t *parents [2] = {this, session};
|
||||||
pipe_t *pipes [2] = {NULL, NULL};
|
pipe_t *pipes [2] = {NULL, NULL};
|
||||||
int hwms [2] = {options.sndhwm, options.rcvhwm};
|
int hwms [2] = {options.sndhwm, options.rcvhwm};
|
||||||
bool delays [2] = {options.delay_on_disconnect, options.delay_on_close};
|
bool delays [2] = {options.delay_on_disconnect, options.delay_on_close};
|
||||||
int rc = pipepair (parents, pipes, hwms, delays);
|
rc = pipepair (parents, pipes, hwms, delays);
|
||||||
errno_assert (rc == 0);
|
errno_assert (rc == 0);
|
||||||
|
|
||||||
// Attach local end of the pipe to the socket object.
|
// Attach local end of the pipe to the socket object.
|
||||||
@@ -463,7 +458,6 @@ int zmq::socket_base_t::connect (const char *addr_)
|
|||||||
|
|
||||||
// Attach remote end of the pipe to the session object later on.
|
// Attach remote end of the pipe to the session object later on.
|
||||||
session->attach_pipe (pipes [1]);
|
session->attach_pipe (pipes [1]);
|
||||||
}
|
|
||||||
|
|
||||||
// Activate the session. Make it a child of this socket.
|
// Activate the session. Make it a child of this socket.
|
||||||
launch_child (session);
|
launch_child (session);
|
||||||
|
|||||||
Reference in New Issue
Block a user