zmq: add support for TIPC transport

A ZeroMQ application can opt for TIPC based sockets
using the TIPC port name format:
zmq_bind(sb, "tipc://{type,lower,upper}");
zmq_connect(sc, "tipc://{type,inst}");

'type' is the service ID, and 'lower/upper' can be
used for service partitioning or basic load
balancing.

ZeroMQ TIPC transport requires a kernel >= 3.8
(nonblocking connect support for TIPC).

Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
This commit is contained in:
Erik Hugne
2013-11-01 09:09:54 +01:00
parent bc88b88804
commit eab85b5295
11 changed files with 914 additions and 3 deletions

View File

@@ -24,6 +24,7 @@
#include "likely.hpp"
#include "tcp_connecter.hpp"
#include "ipc_connecter.hpp"
#include "tipc_connecter.hpp"
#include "pgm_sender.hpp"
#include "pgm_receiver.hpp"
#include "address.hpp"
@@ -500,6 +501,16 @@ void zmq::session_base_t::start_connecting (bool wait_)
return;
}
#endif
#if defined ZMQ_HAVE_LINUX
if (addr->protocol == "tipc") {
tipc_connecter_t *connecter = new (std::nothrow) tipc_connecter_t (
io_thread, this, options, addr, wait_);
alloc_assert (connecter);
launch_child(connecter);
return;
}
#endif
#ifdef ZMQ_HAVE_OPENPGM