Module: IO::Poll

Defined in:
lib/io/poll.rb

Constant Summary collapse

POLLIN =

/usr/include/bits/poll.h /* Event types that can be polled for. These bits may be set in ‘events’ to indicate the interesting event types; they will appear in ‘revents’ to indicate the status of the file descriptor. */

0x001
POLLPRI =

/* There is data to read. */

0x002
POLLOUT =

/* There is urgent data to read. */

0x004
POLLRDNORM =

/* These values are defined in XPG4.2. */

0x040
POLLWRNORM =

/* Priority data may be read. */

0x100
POLLRDBAND =

/* Normal data may be read. */

0x080
POLLWRBAND =

/* Writing now will not block. */

0x200
POLLEXTEND =

FreeBSD extensions: polling on a regular file might return one of these events (currently only supported on local filesystems).

0x0200
POLLATTRIB =

/* file may have been extended */

0x0400
0x0800
POLLWRITE =

/* (un)link/rename may have happened */

0x1000
POLLERR =

/* Event types always implicitly polled for. These bits need not be set in

`events', but they will appear in `revents' to indicate the status of
the file descriptor.  */
0x008
POLLHUP =

/* Error condition. */

0x010
POLLNVAL =

/* Hung up. */

0x020
POLLSTANDARD =

not part of poll.h on linux, but looks handy

(POLLIN|POLLPRI|POLLOUT|POLLRDNORM|POLLRDBAND|POLLWRBAND|POLLERR|POLLHUP|POLLNVAL)
POLLMSG =

/* These are extensions for Linux. */

0x400
POLLREMOVE =
0x1000
POLLRDHUP =
0x2000