From ba67eff167e94105b0975166a2192060ab125e58 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Fri, 15 Jul 2011 08:26:29 +0200 Subject: non-immediate_connect functionality removed It was used only by ROUTER socket. After its removal it became obsolete. Signed-off-by: Martin Sustrik --- src/socket_base.cpp | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) (limited to 'src/socket_base.cpp') diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 98268de..1bc80f1 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -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}; - 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 remote end of the pipe to the session object later on. - session->attach_pipe (pipes [1]); - } + // 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); + + // 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]); // Activate the session. Make it a child of this socket. launch_child (session); -- cgit v1.2.3