class IOWatch
|
A simple wrapper for select()
More... |
|
|
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.
Creates a new instance.
Destroys an instance.
void addIO (const int fd)
|
Adds a file descriptor to
the set of descriptors.
Parameters:
fd | The file descriptor to add.
|
void remIO (const int fd)
|
Removes a file descriptor from the
set of descriptors.
Parameters:
fd | The file descriptor to remove.
|
bool watch (const long secs, const long usecs)
|
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: felfert@usw-pr-shell1.sourceforge.net on Sat Aug 10 18:46:04 2002, using kdoc 2.0a36. |