Using CZMQ I'm trying to capture the routing identity frame of a message
received off a ROUTER socket. I see in the draft API that methods exist for
this for a SERVER socket;
#ifdef CZMQ_BUILD_DRAFT_API
// *** Draft method, for development use, may change without warning ***
// Return message routing ID, if the message came from a ZMQ_SERVER socket.
// Else returns zero.
CZMQ_EXPORT uint32_t
zmsg_routing_id (zmsg_t *self);
// *** Draft method, for development use, may change without warning ***
// Set routing ID on message. This is used if/when the message is sent to a
// ZMQ_SERVER socket.
CZMQ_EXPORT void
zmsg_set_routing_id (zmsg_t *self, uint32_t routing_id);
I believe my installation of CZMQ built the draft API; but I cannot work out
how to access it in my code, is a pre-processor definition required? Also do
the these methods also work for ROUTER sockets?
Really though, I'd rather stick with the stable version. Please could someone
enlighten me on how to get the identity frame using CZMQ? I tried this:
//Inbound from ROUTER so will be carrying an identity frame
zframe_t *identity = zframe_new_empty();
identity = zmsg_pop(msgIn);//strip off id frame
but it crashes at runtime.
With thanks,
Stephen
_______________________________________________
zeromq-dev mailing list
[email protected]
https://lists.zeromq.org/mailman/listinfo/zeromq-dev