YAZ
5.34.0
|
Poll, select wrappers. More...
Go to the source code of this file.
Data Structures | |
struct | yaz_poll_fd |
select/poll fd info More... | |
Macros | |
#define | yaz_poll_add(var, value) var = (enum yaz_poll_mask ) ((int) var | value) |
Enumerations | |
enum | yaz_poll_mask { yaz_poll_none = 0 , yaz_poll_read = 1 , yaz_poll_write = 2 , yaz_poll_except = 4 , yaz_poll_timeout = 8 } |
select/poll masks .. timeout is "output" only More... | |
Functions | |
int | yaz_poll (struct yaz_poll_fd *fds, int num_fds, int sec, int nsec) |
poll wrapper for poll or select More... | |
Poll, select wrappers.
Definition in file poll.h.
#define yaz_poll_add | ( | var, | |
value | |||
) | var = (enum yaz_poll_mask ) ((int) var | value) |
enum yaz_poll_mask |
int yaz_poll | ( | struct yaz_poll_fd * | fds, |
int | num_fds, | ||
int | sec, | ||
int | nsec | ||
) |
poll wrapper for poll or select
fds | array of sockets to be polled |
num_fds | size of fds array (number of sockets) |
sec | number of seconds to wait (-1 for no timeout) |
nsec | nano seconds to wait |
-1 | error |
0 | timeout |
>0 | event occur on one or more sockets |
This functions calls yaz_poll_poll on systems where poll is available and yaz_poll_select where it it unavailable.
Definition at line 161 of file poll.c.
References yaz_poll_select().
Referenced by iochan_event_loop(), iochan_is_alive(), yaz_url_exec(), and ZOOM_event_sys_yaz_poll().