#include <unix_buffer.H>
Public Member Functions | |
virtual | ~Cpoll_methods () |
int | poll_events (short requested_events, const int timeout_ms=1) const |
bool | bad () const |
is the given stream in a bad mode? | |
bool | good () const |
is the given stream in a good mode? | |
int | readable_chars_within (const int size, const int timeout_ms=1000) const |
how many chars are readable on the stream within the a given time? | |
bool | writable_now () const |
is the stream writable without blocking? |
poll - wait for some event on a file descriptor; refer manpage: Linux Programmers's Manual, POLL(2)
This class wraps the linux system call "poll" and provides methods to test whether a stream is readable, writable and connected/alive.
Definition at line 347 of file unix_buffer.H.
virtual Cpoll_methods::~Cpoll_methods | ( | ) | [inline, virtual] |
Definition at line 350 of file unix_buffer.H.
int Cpoll_methods::poll_events | ( | short | requested_events, | |
const int | timeout_ms = 1 | |||
) | const [inline] |
tiny poll wrapper
requested_events | (refer manpage POLL(2)) | |
timeout_ms | timeout in milliseconds (default 1) |
result_events
otherwise Definition at line 357 of file unix_buffer.H.
bool Cpoll_methods::bad | ( | ) | const [inline] |
bool Cpoll_methods::good | ( | ) | const [inline] |
int Cpoll_methods::readable_chars_within | ( | const int | size, | |
const int | timeout_ms = 1000 | |||
) | const [inline] |
how many chars are readable on the stream within the a given time?
Definition at line 384 of file unix_buffer.H.
bool Cpoll_methods::writable_now | ( | ) | const [inline] |