#include <sue_sel.hpp>
Inheritance diagram for SUEFdHandler:
Public Methods | |
SUEFdHandler (int a_fd=-1) | |
Constructor. | |
virtual | ~SUEFdHandler () |
Destructor. | |
virtual void | FdHandle (bool a_r, bool a_w, bool a_ex)=0 |
Callback function for notification. | |
void | SetFd (int a_fd) |
Set/change the file descriptor value. | |
virtual bool | WantRead () const |
Do we want to read? | |
virtual bool | WantWrite () const |
Do we want to write? | |
virtual bool | WantExcept () const |
Do we want exceptions? | |
Protected Attributes | |
int | fd |
File descriptor to handle. | |
Friends | |
class | SUEEventSelector |
When we've got a file descriptor to be handled with select() call (that is, with SUEEventSelector class), we need to create a subclass of SUEFdHandler overriding void FdHandle(bool, bool, bool) virtual method. Then, create an object of that class and register it with the SUEEventSelector object.
|
Constructor. Constructor of the class.
|
|
Destructor. Destructor of the class
|
|
Callback function for notification. The SUEEventSelector calls this method when the file descriptor changes it's status to notify us about it.
Implemented in SUEGenericDuplexSession.
|
|
Set/change the file descriptor value. This method is intended to be used in case we don't know the actual descriptor's value at the moment of creation of the object so that we can't pass it to the constructor.
|
|
Do we want exceptions? Should the selector call this object's handler when an exception happens to the descriptor? Reimplemented in SUEGenericDuplexSession. |
|
Do we want to read? Should the selector call this object's handler when new data is available for reading? Reimplemented in SUEGenericDuplexSession.
|
|
Do we want to write? Should the selector call this object's handler when it is safe to write (that is, write(2) will not block)? Reimplemented in SUEGenericDuplexSession.
|
|
|
|
File descriptor to handle.
|