YAZ
5.34.0
|
Select, poll wrapper. More...
#include <assert.h>
#include <string.h>
#include <errno.h>
#include <yaz/log.h>
#include <yaz/xmalloc.h>
#include <yaz/poll.h>
Go to the source code of this file.
Functions | |
int | yaz_poll_select (struct yaz_poll_fd *fds, int num_fds, int sec, int nsec) |
int | yaz_poll (struct yaz_poll_fd *fds, int num_fds, int sec, int nsec) |
poll wrapper for poll or select More... | |
Select, poll wrapper.
Definition in file poll.c.
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().
int yaz_poll_select | ( | struct yaz_poll_fd * | fds, |
int | num_fds, | ||
int | sec, | ||
int | nsec | ||
) |
Definition at line 52 of file poll.c.
References yaz_poll_fd::fd, yaz_poll_fd::input_mask, mask, yaz_poll_fd::output_mask, yaz_poll_add, yaz_poll_except, yaz_poll_none, yaz_poll_read, yaz_poll_timeout, and yaz_poll_write.
Referenced by yaz_poll().