class IOWatch

A simple wrapper for select() More...

Definition#include <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 ()

IOWatch

Creates a new instance.

 ~IOWatch ()

~IOWatch

Destroys an instance.

void  addIO (const int fd)

addIO

Adds a file descriptor to the set of descriptors.

Parameters:
fdThe file descriptor to add.

void  remIO (const int fd)

remIO

Removes a file descriptor from the set of descriptors.

Parameters:
fdThe file descriptor to remove.

bool  watch (const long secs, const long usecs)

watch

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: rrt on drom on Mon Nov 26 16:06:15 2007, using kdoc 2.0a54.