Introduce ZMQ_ROUTER and ZMQ_DEALER sockets

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
This commit is contained in:
Martin Sustrik
2011-06-20 13:36:18 +02:00
parent f437c9ed9b
commit a28928fe37
7 changed files with 554 additions and 1 deletions

View File

@@ -59,6 +59,8 @@
#include "xrep.hpp"
#include "xpub.hpp"
#include "xsub.hpp"
#include "router.hpp"
#include "dealer.hpp"
bool zmq::socket_base_t::check_tag ()
{
@@ -103,7 +105,13 @@ zmq::socket_base_t *zmq::socket_base_t::create (int type_, class ctx_t *parent_,
break;
case ZMQ_XSUB:
s = new (std::nothrow) xsub_t (parent_, tid_);
break;
break;
case ZMQ_ROUTER:
s = new (std::nothrow) router_t (parent_, tid_);
break;
case ZMQ_DEALER:
s = new (std::nothrow) dealer_t (parent_, tid_);
break;
default:
errno = EINVAL;
return NULL;