class IOWatch

A simple wrapper for select() More...

Definition#include <lib/iowatch.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

A simple wrapper for select()

IOWatch is a simple wrapper for the select system call. In particular, it takes care of passing the maximum file descriptor argument (arg 1) of select() correctly. IOWatch handles select on read descriptors only.

 IOWatch ()

Creates a new instance.

IOWatch ()

Destroys an instance.

void  addIO (const int fd)

Adds a file descriptor to the set of descriptors.

Parameters:
fdThe file descriptor to add.

void  remIO (const int fd)

Removes a file descriptor from the set of descriptors.

Parameters:
fdThe file descriptor to remove.

bool  watch (const long secs, const long usecs)

Performs a select() call.

Parameters:
secsNumber of seconds to wait.
usecsNumber of microseconds to wait.

Returns: true, if any of the descriptors is readable.


Generated by: felfert@usw-pr-shell1.sourceforge.net on Sat Aug 10 18:46:04 2002, using kdoc 2.0a36.