From 5ac63140b01fed145fa41f613308e134420920ab Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 28 Jul 2011 13:19:55 +0200 Subject: Implementations of TCP and IPC transports separated Signed-off-by: Martin Sustrik --- src/session.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/session.cpp') diff --git a/src/session.cpp b/src/session.cpp index b857724..5db080f 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -25,6 +25,7 @@ #include "pipe.hpp" #include "likely.hpp" #include "tcp_connecter.hpp" +#include "ipc_connecter.hpp" #include "vtcp_connecter.hpp" #include "pgm_sender.hpp" #include "pgm_receiver.hpp" @@ -305,12 +306,17 @@ void zmq::session_t::start_connecting (bool wait_) // Create the connecter object. - // Both TCP and IPC transports are using the same infrastructure. - if (protocol == "tcp" || protocol == "ipc") { - + if (protocol == "tcp") { tcp_connecter_t *connecter = new (std::nothrow) tcp_connecter_t ( - io_thread, this, options, protocol.c_str (), address.c_str (), - wait_); + io_thread, this, options, address.c_str (), wait_); + alloc_assert (connecter); + launch_child (connecter); + return; + } + + if (protocol == "ipc") { + ipc_connecter_t *connecter = new (std::nothrow) ipc_connecter_t ( + io_thread, this, options, address.c_str (), wait_); alloc_assert (connecter); launch_child (connecter); return; -- cgit v1.2.3