Hi Richard, Thanks for your answer. I already receive the address but in the particular case of a router socket it's not that useful. I receive something like 'tcp://0.0.0.0:2000' which is the address to which the socket is bound.
My question was if there is a way to know what is the identity of the peer that has been disconnected (as set on the client side with the ZMQ_IDENTITY option). There are many connections behind a router. When I receive a disconnect event I need to know to which connection it belongs in order to take the correct action on the server (callback user code, cleanup resource, ..). Cheers, Joel. Date: Mon, 5 Aug 2013 11:12:34 +0100 From: richard_new...@waters.com Subject: Re: [zeromq-dev] ROUTER socket and zmq_socket_monitor To: "ZeroMQ development list" <zeromq-dev@lists.zeromq.org> Cc: zeromq-dev-boun...@lists.zeromq.org Message-ID: <of242ddfb2.16ef4adc-on80257bbe.0037b5c6-80257bbe.00381...@waters.com> Content-Type: text/plain; charset="us-ascii" Hi Joel, The monitor event mechanism uses 2 sends to communicate, the first message contains the event details and fd, the second will contain the address, so you need to do a second receive to get the address. Apparently this was to make it easier for language bindings. Ric. From: "Joel Lauener" <joel.laue...@cern.ch> To: "zeromq-dev@lists.zeromq.org" <zeromq-dev@lists.zeromq.org> Date: 05/08/2013 11:02 AM Subject: [zeromq-dev] ROUTER socket and zmq_socket_monitor Sent by: zeromq-dev-boun...@lists.zeromq.org Hi, Currently I'm trying to setup a monitor on a ROUTER socket to detect clients disconnections. This system is put in place in addition to an heartbeat mechanism in order to provide faster disconnection detection on the server side. My problem now is that I effectively receive a ZMQ_EVENT_DISCONNECTED event from ZMQ, but the payload of this event only contains "fd" (file descriptor I guess?). In such case is there a way to find the identity of the peer (as set on the client side using the ZMQ_IDENTITY option)? Joel._______________________________________________
_______________________________________________ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev