[zeromq-dev] How to detect if a remote socket has closed
Matt Weinstein
matt_weinstein at yahoo.com
Tue Aug 17 14:14:59 CEST 2010
You're stuck with TCP timeout AFAIK.
You're probably better if building a heartbeat mechanism using a
specialized DEVICE. This will give you failover as well.
It's a "little" wonky to implement until you can move sockets between
threads (the connect() call can have significant latency, so it needs
to run a separate thread).
On Aug 16, 2010, at 1:26 PM, <David.Briant at ubs.com> <David.Briant at ubs.com
> wrote:
> I’m coding in python and I can’t figure out how to detect if a
> remote process has closed or terminated (I exited my python server
> and judging from the cpu usage zmq is trying to re-establish
> connection but I just can’t see how to determine that in the API).
> Is it possible? and if so how do I do it.
>
> Thx
>
> David
>
> PS I’m sure this must have been asked before but I’ve spent the last
> hour looking through the archives and I can’t find it so apologies
> in advance if I’m asking an “obvious” question.
>
> Visit our website at http://www.ubs.com
>
> This message contains confidential information and is intended only
> for the individual named. If you are not the named addressee you
> should not disseminate, distribute or copy this e-mail. Please
> notify the sender immediately by e-mail if you have received this
> e-mail by mistake and delete this e-mail from your system.
>
> E-mails are not encrypted and cannot be guaranteed to be secure or
> error-free as information could be intercepted, corrupted, lost,
> destroyed, arrive late or incomplete, or contain viruses. The sender
> therefore does not accept liability for any errors or omissions in the
> contents of this message which arise as a result of e-mail
> transmission.
> If verification is required please request a hard-copy version. This
> message is provided for informational purposes and should not be
> construed as a solicitation or offer to buy or sell any securities
> or related financial instruments.
>
> UBS Limited is a company registered in England & Wales under company
> number 2035362, whose registered office is at 1 Finsbury Avenue,
> London, EC2M 2PP, United Kingdom.
>
> UBS AG (London Branch) is registered as a branch of a foreign company
> under number BR004507, whose registered office is at
> 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom.
>
> UBS Clearing and Execution Services Limited is a company registered
> in England & Wales under company number 03123037, whose registered
> office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom.
>
> UBS reserves the right to retain all messages. Messages are protected
> and accessed only in legally justified
> cases._______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20100817/2d47b62f/attachment.htm>
More information about the zeromq-dev
mailing list