2002-07-09 12:24:59 +00:00
|
|
|
/* poll.h
|
|
|
|
*
|
|
|
|
* poll is an alternative way to deal with system notification
|
|
|
|
* of events on sockets
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __POLL_H
|
|
|
|
#define __POLL_H
|
|
|
|
|
2002-10-26 13:22:40 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2002-07-09 12:24:59 +00:00
|
|
|
#define POLLIN 0x0001
|
|
|
|
#define POLLPRI 0x0002 /* not used */
|
|
|
|
#define POLLOUT 0x0004
|
|
|
|
#define POLLERR 0x0008
|
|
|
|
|
|
|
|
struct pollfd {
|
|
|
|
int fd;
|
|
|
|
int events; /* events to look for */
|
|
|
|
int revents; /* events that occured */
|
|
|
|
};
|
|
|
|
|
|
|
|
extern int poll(struct pollfd * p, int nb, int timeout);
|
|
|
|
|
2002-10-26 13:22:40 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2002-07-09 12:24:59 +00:00
|
|
|
#endif /* __POLL_H */
|
|
|
|
|