[zeromq-dev] STREAM socket not closing.

Laurent Alebarde l.alebarde at free.fr
Fri Jan 10 09:55:20 CET 2014

Le 10/01/2014 07:10, Matt Connolly a écrit :
> Dear list,
> I’m looking at using the STREAM socket to interface with some plain old TCP clients, however, there seems to be two things I’m missing:
> 1. How do I send a message to a client first? Once the client sends a message I can get the identity frame and use that to reply. How do I send a message before receiving any data?
ZMQ_STREAM is like ROUTER. In my understanding and small experience, you 
> 2. Closing sockets. I see in the docs that a socket can be closed by sending the identity frame followed by a zero length frame. However, this does not seem to be working.
> I’m expecting to successfully read 0 bytes from the TCP socket meaning that the connection was actively closed, and no error codes. Instead by TCP socket recv blocks forever. The only way I can get this to happen is to close the ZMQ socket, which is not possible when I am using bind and talking to multiple TCP clients.
> Cheers,
> Matt
> _______________________________________________
> 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/20140110/4f339f2d/attachment.htm>

More information about the zeromq-dev mailing list