summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-09-01 15:24:46 +0200
committerMartin Sustrik <sustrik@250bpm.com>2010-09-01 15:24:46 +0200
commit651c1adc80ddc724877f2ebedf07d18e21e363f6 (patch)
tree6719c3d38a4195d81367b33658470cecc80c5eb8
parentce0972dca3982538fd123b61fbae3928fad6d1e7 (diff)
sys transport introdced; inproc://log moved to sys://log
-rw-r--r--src/ctx.cpp2
-rw-r--r--src/socket_base.cpp10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/ctx.cpp b/src/ctx.cpp
index f66e1fe..677253a 100644
--- a/src/ctx.cpp
+++ b/src/ctx.cpp
@@ -70,7 +70,7 @@ zmq::ctx_t::ctx_t (uint32_t io_threads_) :
// Create the logging infrastructure.
log_socket = create_socket (ZMQ_PUB);
zmq_assert (log_socket);
- int rc = log_socket->bind ("inproc://log");
+ int rc = log_socket->bind ("sys://log");
zmq_assert (rc == 0);
}
diff --git a/src/socket_base.cpp b/src/socket_base.cpp
index e3b956a..4a0ed24 100644
--- a/src/socket_base.cpp
+++ b/src/socket_base.cpp
@@ -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.
if (protocol_ != "inproc" && protocol_ != "ipc" && protocol_ != "tcp" &&
- protocol_ != "pgm" && protocol_ != "epgm") {
+ protocol_ != "pgm" && protocol_ != "epgm" && protocol_ != "sys") {
errno = EPROTONOSUPPORT;
return -1;
}
@@ -282,8 +282,8 @@ int zmq::socket_base_t::bind (const char *addr_)
if (rc != 0)
return -1;
- if (protocol == "inproc")
- return register_endpoint (address.c_str (), this);
+ if (protocol == "inproc" || protocol == "sys")
+ return register_endpoint (addr_, this);
if (protocol == "tcp" || protocol == "ipc") {
zmq_listener_t *listener = new (std::nothrow) zmq_listener_t (
@@ -335,14 +335,14 @@ int zmq::socket_base_t::connect (const char *addr_)
if (rc != 0)
return -1;
- if (protocol == "inproc") {
+ if (protocol == "inproc" || protocol == "sys") {
// TODO: inproc connect is specific with respect to creating pipes
// as there's no 'reconnect' functionality implemented. Once that
// is in place we should follow generic pipe creation algorithm.
// Find the peer socket.
- socket_base_t *peer = find_endpoint (address.c_str ());
+ socket_base_t *peer = find_endpoint (addr_);
if (!peer)
return -1;