|
XSocket API
2.0
XIA Socket Library
|
Xselect(), Xpoll() - synchronous I/O multiplexing. More...
#include "Xsocket.h"Functions | |
| int | Xpoll (struct pollfd *ufds, unsigned nfds, int timeout) |
| waits for one of a set of Xsockets or file descriptors to become ready to perform I/O. More... | |
| int | Xselect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout) |
| waits for one of a set of Xsockets to become ready to perform I/O. More... | |
| int Xpoll | ( | struct pollfd * | ufds, |
| unsigned | nfds, | ||
| int | timeout | ||
| ) |
Xsocket specific version of poll. See the poll man page for more detailed information. This function is compatible with Xsockets as well as regular sockets and fds. Xsockets are polled via click, and regular sockets and fds are handled through the normal poll API.
| ufds | array of pollfds indicating sockets and states to check for |
| nfds | number of entries in ufds socket ids specified as 0 or negative will be ignored valid flags for events are POLLIN | POLLOUT | POLLERR revents contains the returned flags and can be POLLIN | POLLOUT | POLLERR | POLLINVAL | POLLHUP |
| timeout | number of milliseconds to wait for an event to happen |
| int Xselect | ( | int | nfds, |
| fd_set * | readfds, | ||
| fd_set * | writefds, | ||
| fd_set * | errorfds, | ||
| struct timeval * | timeout | ||
| ) |
Xsocket specific version of select. See the select man page for more detailed information. This function is compatible with Xsockets as well as regular sockets and fds. Xsockets are handled with the Xpoll APIs via click, and regular sockets and fds are handled through the normal select API.
| nfds | The highest socket number contained in the fd_sets plus 1 |
| readfds | fd_set containing sockets to check for readability |
| writefds | fd_set containing sockets to check for writability |
| errorfds | fd_set containing sockets to check for errors |
| timeout | amount of time to wait for a socket to change state |
1.8.11