It turns out that this functionality was added in January to libzmq.
An empty message is sent both on connect and also upon disconnect.

The net effect for my use case is that one receives 2 empty messages when
the connection breaks and then when it gets reconnected.


A pair of python scripts that demonstrate the behavior (A tcp publisher
subscribed using zmq_stream):
https://github.com/pijyoi/test_zmqstream



On Thu, Apr 24, 2014 at 6:40 PM, Pieter Hintjens <p...@imatix.com> wrote:

> On Thu, Apr 24, 2014 at 12:35 PM, KIU Shueng Chuan <nixch...@gmail.com>
> wrote:
>
> > Sadly, I am dealing with "publisher" TCP-servers that start sending data
> > upon client connection. The protocol is some small fixed header followed
> by
> > a variable length message.
> >
> > A ZMQ_STREAM server already uses sending of an empty message in order to
> > disconnect a client. Would be nice if an empty message could be received
> by
> > the ZMQ_STREAM client upon disconnection.
>
> This sounds familiar, so may already be implemented. I've not used
> ZMQ_STREAM much. Signaling the end of a connection with an empty
> message is definitely a decent idea.
>
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to