mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-06 05:00:07 +01:00
radio-dish pattern
This commit is contained in:
@@ -74,9 +74,10 @@ 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",
|
||||
"SERVER", "CLIENT"};
|
||||
zmq_assert (socket_type >= 0 && socket_type <= 13);
|
||||
"XPUB", "XSUB", "STREAM",
|
||||
"SERVER", "CLIENT",
|
||||
"RADIO", "DISH"};
|
||||
zmq_assert (socket_type >= 0 && socket_type <= 15);
|
||||
return names [socket_type];
|
||||
}
|
||||
|
||||
@@ -192,6 +193,10 @@ bool zmq::mechanism_t::check_socket_type (const std::string& type_) const
|
||||
return type_ == "CLIENT";
|
||||
case ZMQ_CLIENT:
|
||||
return type_ == "SERVER";
|
||||
case ZMQ_RADIO:
|
||||
return type_ == "DISH";
|
||||
case ZMQ_DISH:
|
||||
return type_ == "RADIO";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user