|int||GetFd () const|
|int||GetEventMask () const|
|void||SetFd (int FD)|
|virtual void||HandleEvent (EventType et, int errornum=0)=0|
|Public Member Functions inherited from classbase|
|virtual CullResult||cull ()|
This class is a basic I/O handler class. Any object which wishes to receive basic I/O events from the socketengine must derive from this class and implement the HandleEvent() method. The derived class must then be added to SocketEngine using the method SocketEngine::AddFd(), after which point the derived class will receive events to its HandleEvent() method. The derived class should also implement one of Readable() and Writeable(). In the current implementation, only Readable() is used. If this returns true, the socketengine inserts a readable socket. If it is false, the socketengine inserts a writeable socket. The derived class should never change the value this function returns without first deleting the socket from the socket engine. The only requirement beyond this for an event handler is that it must have a file descriptor. What this file descriptor is actually attached to is completely up to you.
Get the current file descriptor
Process an I/O event. You MUST implement this function in your derived class, and it will be called whenever read or write events are received.
|et||either one of EVENT_READ for read events, EVENT_WRITE for write events and EVENT_ERROR for error events.|
|errornum||The error code which goes with an EVENT_ERROR.|
File descriptor. All events which can be handled must have a file descriptor. This allows you to add events for sockets, fifo's, pipes, and various other forms of IPC. Do not change this while the object is registered with the SocketEngine