mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-29 12:18:04 +01:00
Problem: Property names are duplicated at several places
Solution: Define them in zmq.h and use them (currently in DRAFT API)
This commit is contained in:
@@ -281,13 +281,15 @@ int zmq::gssapi_mechanism_base_t::produce_ready (msg_t *msg_)
|
||||
|
||||
// Add socket type property
|
||||
const char *socket_type = socket_type_string (options.type);
|
||||
ptr += add_property (ptr, "Socket-Type", socket_type, strlen (socket_type));
|
||||
ptr += add_property (ptr, ZMQ_MSG_PROPERTY_SOCKET_TYPE, socket_type,
|
||||
strlen (socket_type));
|
||||
|
||||
// Add identity property
|
||||
if (options.type == ZMQ_REQ
|
||||
|| options.type == ZMQ_DEALER
|
||||
|| options.type == ZMQ_ROUTER)
|
||||
ptr += add_property (ptr, "Identity", options.identity, options.identity_size);
|
||||
ptr += add_property (ptr, ZMQ_MSG_PROPERTY_IDENTITY, options.identity,
|
||||
options.identity_size);
|
||||
|
||||
const size_t command_size = ptr - command_buffer;
|
||||
const int rc = msg_->init_size (command_size);
|
||||
|
||||
Reference in New Issue
Block a user