[zeromq-dev] 0MQ 4 - how to detect closed stream socket ?
KIU Shueng Chuan
nixchuan at gmail.com
Thu Apr 24 03:09:27 CEST 2014
I am trying out ZMQ_STREAM and it's great that (re)-connects are handled
asynchronously. However...
Say a TCP server sends out 10000-byte messages such that multiple recv()s
are required to get the whole message. A ZMQ_STREAM client receives 1500
bytes and then the connection gets broken. (E.g. server gets killed and
restarted) How would the client know to reset its message assembling state
if it doesn't know about the disconnection?
On Sat, Oct 12, 2013 at 11:49 PM, Pieter Hintjens <ph at imatix.com> wrote:
> Indeed... ZMQ_STREAM like all sockets will reconnect opportunistically
> so you don't get a formal notification of a closed socket.
>
> On Fri, Oct 11, 2013 at 9:03 PM, Charles Remes <lists at chuckremes.com>
> wrote:
> > Via a timeout.
> >
> > On Oct 11, 2013, at 12:15 PM, itlists at schrievkrom.de wrote:
> >
> >> How can I detect, that the server has closed a stream client socket ?
> >>
> >> Marten
> >> _______________________________________________
> >> zeromq-dev mailing list
> >> zeromq-dev at lists.zeromq.org
> >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> >
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev at lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> 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/20140424/3e4b3f01/attachment.htm>
More information about the zeromq-dev
mailing list