On Wed, 2017-08-02 at 14:45 +0500, Parkash Kumar wrote: > Hi Jeol Lauener, > > Based on your comment: > > For us (at CERN) we mostly need this for the case where the client is > so > broken that he is not going to try to reconnect. However its TCP > stack is > still alive and he is keeping the socket open. In such case we want > to have > a mean to clean the socket resource on the server side. So simply > closing a > ROUTER's underlying socket by client identity is enough. No protocol > change > needed, at least for us ;) > > I have same situation here, connection remains in ESTABLISHED state > even > after client connection is broken. Can you please let me know how you > have > achieved this? I have an identity ZFrame in ZMsg, how to convert this > client identity in socket object and close it? > > > Thanks. > > Kind Regards, > > Parkash Kumar
You can use the ZMQ_TCP_KEEPALIVE* socket options to enable TCP heartbeat and change the timeout - default is 4 hours on Linux iirc. Then the kernel will kill the socket and the library will handle it -- Kind regards, Luca Boccassi _______________________________________________ zeromq-dev mailing list zeromq-dev@lists.zeromq.org https://lists.zeromq.org/mailman/listinfo/zeromq-dev