[zeromq-dev] ZMQ_LINGER socket option
sustrik at 250bpm.com
Sat Oct 16 18:29:46 CEST 2010
To prevent 0MQ/2.1 processes hanging up indefinitely when messages
cannot be delivered to the peer, ZMQ_LINGER option was introduced. It
has more or less the same semantics as standard POSIX SO_LINGER option,
however, the argument is int rather than the structure to make it easy
for language bindings to manipulate it.
Value of -1 means "try to send the data indefinitely".
Value of 0 means "drop the unsent messages and exit"
Positive value means "try to send for N milliseconds, then drop the
unsent messages and exit"
The option is available in master.
More information about the zeromq-dev