[zeromq-dev] identify server endpoint disconnection from client socket

AJ Lewis aj.lewis at quantum.com
Wed Nov 13 16:34:36 CET 2013


Use zmq_poll() with a timeout and loop on it.  If it returns 1 or more events, you can
handle them (ie, recv the message and process it) and if it doesn't return any events,
you can do other work and then come back around to the poll.

On Wed, Nov 13, 2013 at 05:33:52PM +0530, Sameer Mahajan wrote:
> How do I find out from a zero MQ socket client program that the remote
> connection is down (e.g. the server is down). When I do a recv and the
> server is down it blocks if I do not set any timeout. However in my case I
> cannot put any reliable timeout value to get around it since otherwise the
> recv times out even when the server is up but the response really takes
> longer than the timeout value that I have set.
> 
> Any ideas?
> 
> thanks,
> sameer

> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev


-- 
AJ Lewis
Software Engineer
Quantum Corporation

Work:    651 688-4346
email:   aj.lewis at quantum.com

----------------------------------------------------------------------
The information contained in this transmission may be confidential. Any disclosure, copying, or further distribution of confidential information is not permitted unless such privilege is explicitly granted in writing by Quantum. Quantum reserves the right to have electronic communications, including email and attachments, sent across its networks filtered through anti virus and spam software programs and retain such messages in order to comply with applicable data security and retention requirements. Quantum is not responsible for the proper and complete transmission of the substance of this communication or for any delay in its receipt.



More information about the zeromq-dev mailing list