You can call zmq_msg_get with ZMQ_SRCFD, however this option is deprecated and I don't recommend it.
Instead you can call the zmq_msg_gets to get metadata about the socket, right now only "Peer-Address" is supported but it is pretty easy to add more properties. If you want to add more this is the place https://github.com/zeromq/libzmq/blob/master/src/stream_engine.cpp#L984 On Tue, Jul 19, 2016 at 8:43 AM, Bharat Somani <[email protected]> wrote: > > I am using ZMQ zmq_msg_recv() for receiving client connections and > requests, How do I get the sock fd of the client who has sent this message? > I have read somewhere that this feature is added in ZMQ 4 but somehow not > able to locate which API gives the sock fd. > > Any pointers in this regards? > > Regards, > Bharat > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
