# class IOWatch

A simple wrapper for select() More...

Definition | `#include <iowatch.h>`
List of all Methods

Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- IOWatch ()
- ~IOWatch ()
- void addIO (const int fd)
- void remIO (const int fd)
- bool watch (const long secs, const long usecs)

## 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:

fd | The file descriptor to add.

void remIO (const int fd)

### remIO

Removes a file descriptor from the set of descriptors.

Parameters:

fd | The file descriptor to remove.

bool watch (const long secs, const long usecs)

### watch

Performs a select() call.

Parameters:

secs | Number of seconds to wait.
usecs | Number 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.