[zeromq-dev] Effect of RCVHWM on pull socket at context termination?

Pieter Hintjens ph at imatix.com
Mon Mar 10 22:44:58 CET 2014


I think the man page is technically incorrect. The messages may have
been sent to the network, yet not yet be received by the peer. And
certainly not necessarily delivered to the application (libzmq, then).

On Mon, Mar 10, 2014 at 8:00 PM, Jonathan Kamens <jkamens at quantopian.com> wrote:
> Hi Pieter,
>
> Thanks for your reply. I'm still confused, though...
>
>
> When you close TCP sockets, you will lose any data that hasn't yet
> been received. There's no way to force data to be received except by
> some kind of handshake back from the receiving application.
>
>
> The documentation for zmq_term says, "For each socket within context, all
> messages sent by the application with zmq_send() have either been physically
> transferred to a network peer, or the socket's linger period set with the
> ZMQ_LINGER socket option has expired." Is that correct? I.e., is it correct
> that if data is being transmitted over a TCP socket, and ZMQ_LINGER is set
> to -1, a context won't terminate until data sent over that socket has been
> transmitted to the other end of it?
>
> If that is correct, then how can the data be lost on close if it has already
> been physically transferred to the other end of the socket? What am I
> missing?
>
> Thanks,
>
> Jonathan Kamens
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>



More information about the zeromq-dev mailing list