[zeromq-dev] behavior of client with blocking
Ian Barber
ian.barber at gmail.com
Wed May 30 11:02:44 CEST 2012
On Wed, May 30, 2012 at 9:09 AM, Arun Dobriyal <arundobriyaliitkgp at gmail.com
> wrote:
>
> according to the documentation if no flag is set, this client socket would
> block, now does that mean, that the code would block at the line where i am
> calling zmq_send ?
>
> If yes, can this behavior be changed by ZMQ_NOBLOCK flag for the PUSH
> socket..
>
>
Not quite - the send() would not block as the PUSH side would have no
queue, so the message would go into the socket queue, and then into the TCP
buffer. Assuming that the other side was completely blocked, the PUSH would
not be able to transfer until space was made. When you attempted to
shutdownt the PUSH side, the shutdown will then block, unless you have set
the ZMQ_LINGER option to 0 as it will attempt to flush out it's existing
queue.
Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120530/371a71a7/attachment.htm>
More information about the zeromq-dev
mailing list