Scatter-Gather socket types

This commit is contained in:
somdoron
2016-04-21 13:23:44 +03:00
committed by Doron Somech
parent 317499edae
commit e6dae56c6e
13 changed files with 443 additions and 5 deletions

View File

@@ -77,8 +77,9 @@ const char *zmq::mechanism_t::socket_type_string (int socket_type) const
"DEALER", "ROUTER", "PULL", "PUSH",
"XPUB", "XSUB", "STREAM",
"SERVER", "CLIENT",
"RADIO", "DISH"};
zmq_assert (socket_type >= 0 && socket_type <= 15);
"RADIO", "DISH",
"GATHER", "SCATTER"};
zmq_assert (socket_type >= 0 && socket_type <= 17);
return names [socket_type];
}
@@ -198,6 +199,10 @@ bool zmq::mechanism_t::check_socket_type (const std::string& type_) const
return type_ == "DISH";
case ZMQ_DISH:
return type_ == "RADIO";
case ZMQ_GATHER:
return type_ == "SCATTER";
case ZMQ_SCATTER:
return type_ == "GATHER";
default:
break;
}