Beamlib 3.1.1
This is the Beam C++ class library.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
BPoll Class Reference

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

#include <BPoll.h>

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. More...
 
void delFd (int fd)
 Remove a file descriptor from polling list. More...
 
BError doPoll (int &fd, int timeoutUs=-1)
 Perform polling operation. More...
 
BError doPollEvents (int &fd, int &events, int timeoutUs=-1)
 Perform polling operation and return events. More...
 
int getPollFdsNum ()
 
PollFdgetPollFds ()
 
void clear ()
 

Detailed Description

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

Member Typedef Documentation

◆ PollFd

typedef struct pollfd BPoll::PollFd

Constructor & Destructor Documentation

◆ BPoll()

BPoll::BPoll ( )

◆ ~BPoll()

BPoll::~BPoll ( )

Member Function Documentation

◆ append()

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

Append a file descriptor to polling list.

◆ delFd()

void BPoll::delFd ( int  fd)

Remove a file descriptor from polling list.

◆ doPoll()

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

Perform polling operation.

◆ doPollEvents()

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

Perform polling operation and return events.

◆ getPollFdsNum()

int BPoll::getPollFdsNum ( )

◆ getPollFds()

BPoll::PollFd * BPoll::getPollFds ( )

◆ clear()

void BPoll::clear ( )

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