From dee8b2360ac0084165401dd61fc485226402124d Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 31 Oct 2011 15:44:42 +0100 Subject: New style ROUTER socket removed. Signed-off-by: Martin Sustrik --- src/socket_base.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/socket_base.cpp') diff --git a/src/socket_base.cpp b/src/socket_base.cpp index a4d89db..0a5f732 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -60,7 +60,6 @@ #include "xrep.hpp" #include "xpub.hpp" #include "xsub.hpp" -#include "router.hpp" bool zmq::socket_base_t::check_tag () { @@ -106,9 +105,6 @@ zmq::socket_base_t *zmq::socket_base_t::create (int type_, class ctx_t *parent_, case ZMQ_XSUB: s = new (std::nothrow) xsub_t (parent_, tid_); break; - case ZMQ_ROUTER: - s = new (std::nothrow) router_t (parent_, tid_); - break; default: errno = EINVAL; return NULL; -- cgit v1.2.3 From ac7717b7b35f441fc3aeeb1528e63f147c00913a Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 31 Oct 2011 16:20:30 +0100 Subject: 250bpm copyrights added Signed-off-by: Martin Sustrik --- src/socket_base.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/socket_base.cpp') diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 0a5f732..1137d22 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file -- cgit v1.2.3 From 626099aa2a292178872843c55cc5226e6850f2ed Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 31 Oct 2011 16:37:20 +0100 Subject: VTCP transport removed Signed-off-by: Martin Sustrik --- src/socket_base.cpp | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'src/socket_base.cpp') diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 1137d22..e990ba1 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -37,7 +37,6 @@ #include "socket_base.hpp" #include "tcp_listener.hpp" #include "ipc_listener.hpp" -#include "vtcp_listener.hpp" #include "tcp_connecter.hpp" #include "io_thread.hpp" #include "session_base.hpp" @@ -173,8 +172,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_ != "sys" && - protocol_ != "vtcp") { + protocol_ != "pgm" && protocol_ != "epgm" && protocol_ != "sys") { errno = EPROTONOSUPPORT; return -1; } @@ -188,14 +186,6 @@ int zmq::socket_base_t::check_protocol (const std::string &protocol_) } #endif - // If 0MQ is not compiled with VTCP, vtcp transport is not avaialble. -#if !defined ZMQ_HAVE_VTCP - if (protocol_ == "vtcp") { - errno = EPROTONOSUPPORT; - return -1; - } -#endif - // IPC transport is not available on Windows and OpenVMS. #if defined ZMQ_HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS if (protocol_ == "ipc") { @@ -389,21 +379,6 @@ int zmq::socket_base_t::bind (const char *addr_) } #endif -#if defined ZMQ_HAVE_VTCP - if (protocol == "vtcp") { - vtcp_listener_t *listener = new (std::nothrow) vtcp_listener_t ( - io_thread, this, options); - alloc_assert (listener); - int rc = listener->set_address (address.c_str ()); - if (rc != 0) { - delete listener; - return -1; - } - launch_child (listener); - return 0; - } -#endif - zmq_assert (false); return -1; } -- cgit v1.2.3 From 7842c7107358324e8c5b9af7272e6dcab8c97931 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Tue, 1 Nov 2011 13:39:54 +0100 Subject: LABELS and COMMANDs removed Signed-off-by: Martin Sustrik --- src/socket_base.cpp | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) (limited to 'src/socket_base.cpp') diff --git a/src/socket_base.cpp b/src/socket_base.cpp index e990ba1..967d314 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -120,8 +121,6 @@ zmq::socket_base_t::socket_base_t (ctx_t *parent_, uint32_t tid_) : destroyed (false), last_tsc (0), ticks (0), - rcvlabel (false), - rcvcmd (false), rcvmore (false) { } @@ -252,26 +251,6 @@ int zmq::socket_base_t::getsockopt (int option_, void *optval_, return -1; } - if (option_ == ZMQ_RCVLABEL) { - if (*optvallen_ < sizeof (int)) { - errno = EINVAL; - return -1; - } - *((int*) optval_) = rcvlabel ? 1 : 0; - *optvallen_ = sizeof (int); - return 0; - } - - if (option_ == ZMQ_RCVCMD) { - if (*optvallen_ < sizeof (int)) { - errno = EINVAL; - return -1; - } - *((int*) optval_) = rcvcmd ? 1 : 0; - *optvallen_ = sizeof (int); - return 0; - } - if (option_ == ZMQ_RCVMORE) { if (*optvallen_ < sizeof (int)) { errno = EINVAL; @@ -496,12 +475,8 @@ int zmq::socket_base_t::send (msg_t *msg_, int flags_) return -1; // At this point we impose the flags on the message. - if (flags_ & ZMQ_SNDLABEL) - msg_->set_flags (msg_t::label); if (flags_ & ZMQ_SNDMORE) msg_->set_flags (msg_t::more); - if (flags_ & ZMQ_SNDCMD) - msg_->set_flags (msg_t::command); // Try to send the message. rc = xsend (msg_, flags_); @@ -870,13 +845,7 @@ void zmq::socket_base_t::terminated (pipe_t *pipe_) void zmq::socket_base_t::extract_flags (msg_t *msg_) { - rcvlabel = msg_->flags () & msg_t::label; - if (rcvlabel) - msg_->reset_flags (msg_t::label); rcvmore = msg_->flags () & msg_t::more ? true : false; if (rcvmore) msg_->reset_flags (msg_t::more); - rcvcmd = msg_->flags () & msg_t::command ? true : false; - if (rcvcmd) - msg_->reset_flags (msg_t::command); } -- cgit v1.2.3 From 8e21d64c974344b5b2b83cac85d12c51392fe74b Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Tue, 1 Nov 2011 18:06:11 +0100 Subject: Copyright dates adjusted to reflect reality Signed-off-by: Martin Sustrik --- src/socket_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/socket_base.cpp') diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 967d314..583818b 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file -- cgit v1.2.3 From a4843b65d24f9caa188bb2454b28080f0cee8484 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Fri, 4 Nov 2011 08:00:47 +0100 Subject: Identities re-introduced However, the "durable socket" behaviour wasn't re-added. Identities are used solely for routing in REQ/REP pattern. Signed-off-by: Martin Sustrik --- src/socket_base.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/socket_base.cpp') diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 583818b..a59ba69 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -845,7 +845,16 @@ void zmq::socket_base_t::terminated (pipe_t *pipe_) void zmq::socket_base_t::extract_flags (msg_t *msg_) { + // Test whether IDENTITY flag is valid for this socket type. + if (unlikely (msg_->flags () & msg_t::identity)) { + zmq_assert (options.recv_identity); +printf ("identity recvd\n"); + } + + + // Remove MORE flag. rcvmore = msg_->flags () & msg_t::more ? true : false; if (rcvmore) msg_->reset_flags (msg_t::more); } + -- cgit v1.2.3