diff options
author | Martin Sustrik <sustrik@fastmq.commkdir> | 2010-01-04 15:46:20 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@fastmq.commkdir> | 2010-01-04 15:46:20 +0100 |
commit | f2b235db165e459f7f265993477dae0dc987125a (patch) | |
tree | 4c51a044bb8a66d4787297540d78d88434632732 /man | |
parent | 7884f4541aa6f95b76e0b2429baaf11108c543a1 (diff) |
ZMQII-29: Add timeout to zmq_poll function
Diffstat (limited to 'man')
-rw-r--r-- | man/man3/zmq_poll.3 | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/man/man3/zmq_poll.3 b/man/man3/zmq_poll.3 index 9782691..82277e3 100644 --- a/man/man3/zmq_poll.3 +++ b/man/man3/zmq_poll.3 @@ -2,7 +2,7 @@ .SH NAME zmq_poll \- polls for events on a set of 0MQ and POSIX sockets .SH SYNOPSIS -.B int zmq_poll (zmq_pollitem_t *items, int nitems); +.B int zmq_poll (zmq_pollitem_t *items, int nitems, long timeout); .SH DESCRIPTION Waits for the events specified by .IR items @@ -31,7 +31,7 @@ specifies which events to wait for. It's a combination of the values below. Once the call exits, .IR revent will be filled with events that have actually occured on the socket. The field -will contain a combination of the following values. +will contain a combination of the values below. .IP "\fBZMQ_POLLIN\fP" poll for incoming messages. @@ -40,6 +40,12 @@ wait while message can be set socket. Poll will return if a message of at least one byte can be written to the socket. However, there is no guarantee that arbitrarily large message can be sent. +.IR timeout +argument specifies an upper limit on the time for which +.IR zmq_poll +will block, in microseconds. Specifying a negative value in timeout means +an infinite timeout. + .SH RETURN VALUE Function returns number of items signaled or -1 in the case of error. .SH ERRORS |