Commit 651c1adc authored by Martin Sustrik's avatar Martin Sustrik

sys transport introdced; inproc://log moved to sys://log

parent ce0972dc
...@@ -70,7 +70,7 @@ zmq::ctx_t::ctx_t (uint32_t io_threads_) : ...@@ -70,7 +70,7 @@ zmq::ctx_t::ctx_t (uint32_t io_threads_) :
// Create the logging infrastructure. // Create the logging infrastructure.
log_socket = create_socket (ZMQ_PUB); log_socket = create_socket (ZMQ_PUB);
zmq_assert (log_socket); zmq_assert (log_socket);
int rc = log_socket->bind ("inproc://log"); int rc = log_socket->bind ("sys://log");
zmq_assert (rc == 0); zmq_assert (rc == 0);
} }
......
...@@ -143,7 +143,7 @@ int zmq::socket_base_t::check_protocol (const std::string &protocol_) ...@@ -143,7 +143,7 @@ int zmq::socket_base_t::check_protocol (const std::string &protocol_)
{ {
// First check out whether the protcol is something we are aware of. // First check out whether the protcol is something we are aware of.
if (protocol_ != "inproc" && protocol_ != "ipc" && protocol_ != "tcp" && if (protocol_ != "inproc" && protocol_ != "ipc" && protocol_ != "tcp" &&
protocol_ != "pgm" && protocol_ != "epgm") { protocol_ != "pgm" && protocol_ != "epgm" && protocol_ != "sys") {
errno = EPROTONOSUPPORT; errno = EPROTONOSUPPORT;
return -1; return -1;
} }
...@@ -282,8 +282,8 @@ int zmq::socket_base_t::bind (const char *addr_) ...@@ -282,8 +282,8 @@ int zmq::socket_base_t::bind (const char *addr_)
if (rc != 0) if (rc != 0)
return -1; return -1;
if (protocol == "inproc") if (protocol == "inproc" || protocol == "sys")
return register_endpoint (address.c_str (), this); return register_endpoint (addr_, this);
if (protocol == "tcp" || protocol == "ipc") { if (protocol == "tcp" || protocol == "ipc") {
zmq_listener_t *listener = new (std::nothrow) zmq_listener_t ( zmq_listener_t *listener = new (std::nothrow) zmq_listener_t (
...@@ -335,14 +335,14 @@ int zmq::socket_base_t::connect (const char *addr_) ...@@ -335,14 +335,14 @@ int zmq::socket_base_t::connect (const char *addr_)
if (rc != 0) if (rc != 0)
return -1; return -1;
if (protocol == "inproc") { if (protocol == "inproc" || protocol == "sys") {
// TODO: inproc connect is specific with respect to creating pipes // TODO: inproc connect is specific with respect to creating pipes
// as there's no 'reconnect' functionality implemented. Once that // as there's no 'reconnect' functionality implemented. Once that
// is in place we should follow generic pipe creation algorithm. // is in place we should follow generic pipe creation algorithm.
// Find the peer socket. // Find the peer socket.
socket_base_t *peer = find_endpoint (address.c_str ()); socket_base_t *peer = find_endpoint (addr_);
if (!peer) if (!peer)
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment