Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
smallset_t Class Reference

checks whether data is avaiable on sockets More...

#include <socket.h>

+ Collaboration diagram for smallset_t:

Public Member Functions

 smallset_t ()
 ~smallset_t ()
bool canwrite (int ix)
void check ()
void init (int ix)
bool isdata (int ix)
bool iserror (int ix)
bool ishup (int ix)
void set (int ix, int socket)
void wait (int msecs)
void waitwrite (int msecs)

Private Member Functions

void destroy ()
void runpoll (int msecs)

Private Attributes

pollfditems
int nitems

Detailed Description

checks whether data is avaiable on sockets

This is a structure which is used to track whether data is avaible on a series of sockets. As such, it is a replacement for, and actually a wrapper for, the standard Unix poll() and select() functions.

Constructor & Destructor Documentation

smallset_t::smallset_t ( )

Constructor.

smallset_t::~smallset_t ( )

Destructor.

Member Function Documentation

bool smallset_t::canwrite ( int  ix)

Returns true if you can write non-blockingly to the socket at ix.

void smallset_t::check ( )

Check the status of the sockets.

void smallset_t::destroy ( )
private
void smallset_t::init ( int  ix)

Intiailizes the structure to hold ix sockets.

bool smallset_t::isdata ( int  ix)

Returns true if you can read non-blockingly from the socket at ix.

bool smallset_t::iserror ( int  ix)

Returns true if an error occured on the socket at ix.

bool smallset_t::ishup ( int  ix)

Returns true if the connection was hung up.

void smallset_t::runpoll ( int  msecs)
private
void smallset_t::set ( int  ix,
int  socket 
)

Adds the socket at the specified index.

void smallset_t::wait ( int  msecs)

Wait for at most the specified time until data is received.

void smallset_t::waitwrite ( int  msecs)

Wait for at most the specified time until we can write on a socket.

Member Data Documentation

pollfd* smallset_t::items
private

Information for the sockets.

int smallset_t::nitems
private

Number of sockets.


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