summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/options.cpp1
-rw-r--r--src/options.hpp6
-rw-r--r--src/socket_base.cpp32
3 files changed, 13 insertions, 26 deletions
diff --git a/src/options.cpp b/src/options.cpp
index be7c4b5..63a1d91 100644
--- a/src/options.cpp
+++ b/src/options.cpp
@@ -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)
diff --git a/src/options.hpp b/src/options.hpp
index a4a0bc6..f1982da 100644
--- a/src/options.hpp
+++ b/src/options.hpp
@@ -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;
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);