[zeromq-dev] Blocking receive with timeout
Pieter Hintjens
ph at imatix.com
Wed Jul 6 21:03:23 CEST 2011
On Wed, Jul 6, 2011 at 8:48 PM, Christian Martinez <chmar at microsoft.com> wrote:
> Quick question, am I missing a timeout option for a blocking receive perhaps
> in one of the flags? If it’s not there, is there a philosophical or
> technical reason for it not to exist?
I guess the main reason is to maintain API compatibility with the
standard socket API. A secondary reason is that receive with timeout
doesn't scale beyond a single socket, and most realistic apps need to
work with multiple sockets.
Thus, we have blocking/non-blocking recvs, and we use a poll semantic
for timing and input/output ready.
You can build timed-out recv wrappers using these APIs, if you need them.
-Pieter
More information about the zeromq-dev
mailing list