[zeromq-dev] 0MQ 4 - how to detect closed stream socket ?

Pieter Hintjens ph at imatix.com
Thu Apr 24 12:40:58 CEST 2014


On Thu, Apr 24, 2014 at 12:35 PM, KIU Shueng Chuan <nixchuan at 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



More information about the zeromq-dev mailing list