Updated security mechanisms to use variable-length commands

RFC23, RFC24, RFC26 now use variable-length command names that
end in null octet (valid C strings) instead of fixed-length
space padded strings.
This commit is contained in:
Pieter Hintjens
2013-06-28 11:42:54 +02:00
parent dd14d4e01b
commit 7832addd20
11 changed files with 150 additions and 239 deletions

View File

@@ -52,7 +52,7 @@ 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 >= ZMQ_PAIR && socket_type <= ZMQ_STREAM);
zmq_assert (socket_type >= 0 && socket_type <= 10);
return names [socket_type];
}