Cpoll_methods Class Reference

virtual abstraction layer for the poll system call More...

#include <unix_buffer.H>

Inheritance diagram for Cpoll_methods:

Inheritance graph
[legend]
Collaboration diagram for Cpoll_methods:

Collaboration graph
[legend]

List of all members.

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?


Detailed Description

virtual abstraction layer for the poll system call

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.


Constructor & Destructor Documentation

virtual Cpoll_methods::~Cpoll_methods (  )  [inline, virtual]

Definition at line 350 of file unix_buffer.H.


Member Function Documentation

int Cpoll_methods::poll_events ( short  requested_events,
const int  timeout_ms = 1 
) const [inline]

tiny poll wrapper

Parameters:
requested_events (refer manpage POLL(2))
timeout_ms timeout in milliseconds (default 1)
Returns:
-1 on error, or result_events otherwise

Definition at line 357 of file unix_buffer.H.

bool Cpoll_methods::bad (  )  const [inline]

is the given stream in a bad mode?

Definition at line 371 of file unix_buffer.H.

bool Cpoll_methods::good (  )  const [inline]

is the given stream in a good mode?

Definition at line 378 of file unix_buffer.H.

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]

is the stream writable without blocking?

Definition at line 400 of file unix_buffer.H.


The documentation for this class was generated from the following file:
Generated on Wed Nov 7 23:31:00 2007 for Qsieve by  doxygen 1.5.4