You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's a bit fuzzy but the routing_id should be used. However routing_id methods only deal with SERVER sockets in czmq. So this has te be done manually for now. We can get the sockets routing_id as follows:
byte *rid = (byte *)zsock_identity(streamsender);
This is a bit fuzzy. The ZMQ_IDENTITY option is deprecated in favour of ZMQ_ROUTING_ID. However the routing_id methods in czmq are quite different from zsock_identity (which are generated?). zsock_identity returns directly from zmq_getsockopt. zsock_routing_id returns a cached uint32_t which is only set for SERVER sockets on brecv.
So to workaround this manually we need to call zmq methods directly to retrieve the sockets id:
This is almost identical to calling zsock_identy. However it returns a char* so you cannot know the the size.
The routing_is methods in czmq are draft. Therefore it could be an option to change them so they are more in sync with libzmq's documentation. But reading the code it seems czmq is trying to make the routing _id transparent so users are not bothered with it.
This issue has been automatically marked as stale because it has not had recent activity for 90 days. It will be closed if no further activity occurs within 21 days. Thank you for your contributions.
I'm not sure if czmq supports the stream socket fully. I'm trying to add a test for it in zsock.c:
This asserts on the send"
rc = zmsg_send(&request, streamsender);
It's doing the connect but requesting the routing id is apparently only supported for the SERVER socket?
Anybody thoughts, hints, suggestions?
P.s. cleanup is missing in the code
The text was updated successfully, but these errors were encountered: