Is that what you'd expect? It seems a good minimal solution.

On Fri, Apr 25, 2014 at 11:52 PM, KIU Shueng Chuan <[email protected]> wrote:
> 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 <[email protected]> wrote:
>>
>> On Thu, Apr 24, 2014 at 12:35 PM, KIU Shueng Chuan <[email protected]>
>> 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
>> [email protected]
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
>
> _______________________________________________
> zeromq-dev mailing list
> [email protected]
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to