From f2b235db165e459f7f265993477dae0dc987125a Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 4 Jan 2010 15:46:20 +0100 Subject: ZMQII-29: Add timeout to zmq_poll function --- man/man3/zmq_poll.3 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'man') 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 -- cgit v1.2.3