FileDescriptorManager class Reference (original) (raw)
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members
Manages a collection of FileDescriptors, using fd_sets and select(). More...
#include <[FileDescriptor.h](FileDescriptor%5Fh-source.html)>
Inheritance diagram for FileDescriptorManager:

[legend]
Collaboration diagram for FileDescriptorManager:

[legend]
| [NOHEADER] | |
|---|---|
| void | update (ref< FileDescriptor > const &fd, bool forRead, bool forWrite) |
| void | remove (int fdnum) |
| class | FileDescriptor |
| Public Methods | |
| FileDescriptorManager () | |
| void | closeAll () |
| int | getMaxFd () const |
| void | fillFdSet (fd_set *rfds, fd_set *wfds) const |
| void | processFdSet (fd_set *rfds, fd_set *wfds) |
| bool | poll (struct timeval const *timeout) |
| void | mainloop () |
| int | getCountRegistered () const |
| Private Types | |
| typedef vector< ref<FileDescriptor> > | descVec_t |
| Private Attributes | |
| descVec_t | allFds |
| int | countRegistered |
| int | maxFd |
| fd_set | readFds |
| fd_set | writeFds |
Detailed Description
Manages a collection of FileDescriptors, using fd_sets and select().
Definition at line 186 of file FileDescriptor.h.
Member Typedef Documentation
Constructor & Destructor Documentation
| FileDescriptorManager::FileDescriptorManager ( | ) |
|---|
Member Function Documentation
| void FileDescriptorManager::closeAll ( | ) |
|---|
| | Force close all FileDescriptors managed by this. | | --------------------------------------------------- |
| void FileDescriptorManager::fillFdSet ( | fd_set * rfds, |
|---|---|
| fd_set * wfds ) const |
| | Fills in all entries for managed fds. | | ---------------------------------------- |
| int FileDescriptorManager::getCountRegistered ( | ) const [inline] |
|---|
| int FileDescriptorManager::getMaxFd ( | ) const [inline] |
|---|
| void FileDescriptorManager::mainloop ( | ) |
|---|
| | Repeatedly calls poll(NULL). | | ------------------------------- |
| bool FileDescriptorManager::poll ( | struct timeval const * timeout ) |
|---|
| | Wait for incoming work for up to the given timeout, or forever if timeout is NULL. Returns: true for "work processed"; false for "timed out" | | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| void FileDescriptorManager::processFdSet ( | fd_set * rfds, |
|---|---|
| fd_set * wfds ) |
| | Runs work from a post-select() fdset. | | ---------------------------------------- |
| void FileDescriptorManager::remove ( | int fdnum ) [private] |
|---|
| void FileDescriptorManager::update ( | ref< FileDescriptor > const & fd, |
|---|---|
| bool forRead, | |
| bool forWrite ) [private] |
Friends And Related Function Documentation
class FileDescriptor [friend]
Member Data Documentation
descVec_t FileDescriptorManager::allFds [private]
int FileDescriptorManager::countRegistered [private]
int FileDescriptorManager::maxFd [private]
| | Maximum fd number of all registered FileDescriptors.Definition at line 192 of file FileDescriptor.h. | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
fd_set FileDescriptorManager::readFds [private]
| | Set of fds interested in read-available events.Definition at line 193 of file FileDescriptor.h. | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
fd_set FileDescriptorManager::writeFds [private]
| | Set of fds interested in write-available events.Definition at line 194 of file FileDescriptor.h. | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
The documentation for this class was generated from the following file:
Generated at Wed Aug 15 01:05:28 2001 for mps-cpp by
1.2.6 written by Dimitri van Heesch, © 1997-2001