Cpoll Class Reference

abstraction layer for the poll system call More...

#include <unix_buffer.H>

Inheritance diagram for Cpoll:

Inheritance graph
[legend]
Collaboration diagram for Cpoll:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Cpoll (const int _fd=0)
 create an Cpoll abstraction layer (attached to a socket descriptor)
template<class T>
 Cpoll (const T &obj)
 create an Cpoll abstraction layer attached to an object that provides get_descriptor()
virtual ~Cpoll ()
void attach (const int _fd)
 attach it to a socket descriptor
template<class T>
void attach (const T &obj)

Protected Member Functions

virtual int _get_descriptor () const

Private Attributes

int fd


Detailed Description

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 421 of file unix_buffer.H.


Constructor & Destructor Documentation

Cpoll::Cpoll ( const int  _fd = 0  )  [inline, explicit]

create an Cpoll abstraction layer (attached to a socket descriptor)

Definition at line 431 of file unix_buffer.H.

template<class T>
Cpoll::Cpoll ( const T &  obj  )  [inline, explicit]

create an Cpoll abstraction layer attached to an object that provides get_descriptor()

Definition at line 434 of file unix_buffer.H.

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

Definition at line 436 of file unix_buffer.H.


Member Function Documentation

virtual int Cpoll::_get_descriptor (  )  const [inline, protected, virtual]

Implements Cprovide_descriptor_access.

Definition at line 427 of file unix_buffer.H.

References fd.

void Cpoll::attach ( const int  _fd  )  [inline]

attach it to a socket descriptor

Definition at line 439 of file unix_buffer.H.

template<class T>
void Cpoll::attach ( const T &  obj  )  [inline]

attach it to an object that provides get_descriptor()

Parameters:
obj an object that handles a network connection and provides the attached socket descriptor through get_descriptor()

Definition at line 446 of file unix_buffer.H.


Member Data Documentation

int Cpoll::fd [private]

Definition at line 424 of file unix_buffer.H.

Referenced by _get_descriptor().


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