mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-27 19:10:22 +01:00
adds server socket type and routing id to msg
This commit is contained in:
@@ -64,8 +64,8 @@ const char *zmq::mechanism_t::socket_type_string (int socket_type) const
|
||||
{
|
||||
static const char *names [] = {"PAIR", "PUB", "SUB", "REQ", "REP",
|
||||
"DEALER", "ROUTER", "PULL", "PUSH",
|
||||
"XPUB", "XSUB", "STREAM"};
|
||||
zmq_assert (socket_type >= 0 && socket_type <= 10);
|
||||
"XPUB", "XSUB", "STREAM", "SERVER"};
|
||||
zmq_assert (socket_type >= 0 && socket_type <= 12);
|
||||
return names [socket_type];
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ bool zmq::mechanism_t::check_socket_type (const std::string& type_) const
|
||||
case ZMQ_REP:
|
||||
return type_ == "REQ" || type_ == "DEALER";
|
||||
case ZMQ_DEALER:
|
||||
return type_ == "REP" || type_ == "DEALER" || type_ == "ROUTER";
|
||||
return type_ == "REP" || type_ == "DEALER" || type_ == "ROUTER" || type_ == "SERVER";
|
||||
case ZMQ_ROUTER:
|
||||
return type_ == "REQ" || type_ == "DEALER" || type_ == "ROUTER";
|
||||
case ZMQ_PUSH:
|
||||
@@ -177,6 +177,8 @@ bool zmq::mechanism_t::check_socket_type (const std::string& type_) const
|
||||
return type_ == "PUB" || type_ == "XPUB";
|
||||
case ZMQ_PAIR:
|
||||
return type_ == "PAIR";
|
||||
case ZMQ_SERVER:
|
||||
return type_ == "DEALER";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user