BPoll Class Reference

This class provides an interface for polling a number of file descriptors. It uses round robin polling. More...

#include <BPoll.h>

List of all members.

Public Types

typedef struct pollfd PollFd

Public Member Functions

 BPoll ()
 ~BPoll ()
void append (int fd, int events=POLLIN|POLLERR|POLLHUP|POLLNVAL)
 Append a file descriptor to polling list.
void delFd (int fd)
 Remove a file descriptor from polling list.
BError doPoll (int &fd, int timeoutUs=-1)
 Perform polling operation.
int getPollFdsNum ()
PollFd * getPollFds ()
void clear ()

Private Member Functions

int nextFd (int i)

Private Attributes

int ofdsNum
 The number of FD's in list.
PollFd * ofds
 The list of poll fd's.
int ofdsNext
 The next list entry for round robin polling.

Detailed Description

This class provides an interface for polling a number of file descriptors. It uses round robin polling.


Member Typedef Documentation

typedef struct pollfd BPoll::PollFd [read]

Constructor & Destructor Documentation

BPoll::BPoll (  ) 
BPoll::~BPoll (  ) 

Member Function Documentation

void BPoll::append ( int  fd,
int  events = POLLIN|POLLERR|POLLHUP|POLLNVAL 
)

Append a file descriptor to polling list.

void BPoll::clear (  ) 
void BPoll::delFd ( int  fd  ) 

Remove a file descriptor from polling list.

BError BPoll::doPoll ( int &  fd,
int  timeoutUs = -1 
)

Perform polling operation.

BPoll::PollFd * BPoll::getPollFds (  ) 
int BPoll::getPollFdsNum (  ) 
int BPoll::nextFd ( int  i  )  [private]

Member Data Documentation

PollFd* BPoll::ofds [private]

The list of poll fd's.

int BPoll::ofdsNext [private]

The next list entry for round robin polling.

int BPoll::ofdsNum [private]

The number of FD's in list.


The documentation for this class was generated from the following files:

Generated on 10 Apr 2013 for LibBeamApi by  doxygen 1.6.1