Use a method as a socket multiplexer job. More...
typedef ISocketMultiplexerJob |
|Method )(ISocketMultiplexerJob *, bool, bool, bool)|
|TSocketMultiplexerMethodJob (T *object, Method method, CArchSocket socket, bool readable, bool writeable)|
|run() invokes |
|virtual ISocketMultiplexerJob *||run (bool readable, bool writable, bool error)|
|Handle socket event. |
|virtual CArchSocket||getSocket () const|
|Get the socket. |
|virtual bool||isReadable () const|
|Check for interest in readability. |
|virtual bool||isWritable () const|
|Check for interest in writability. |
Use a method as a socket multiplexer job.
A socket multiplexer job class that invokes a member function.
|CArchSocket TSocketMultiplexerMethodJob< T >::getSocket||(||)|| const
|bool TSocketMultiplexerMethodJob< T >::isReadable||(||)|| const
|bool TSocketMultiplexerMethodJob< T >::isWritable||(||)|| const
|ISocketMultiplexerJob * TSocketMultiplexerMethodJob< T >::run||(||bool||readable,|
Handle socket event.
Called by a socket multiplexer when the socket becomes readable, writable, or has an error. It should return itself if the same job can continue to service events, a new job if the socket must be serviced differently, or NULL if the socket should no longer be serviced. The socket is readable if
readable is true, writable if
writable is true, and in error if
error is true.
This call must not attempt to directly change the job for this socket by calling
removeSocket() on the multiplexer. It must instead return the new job. It can, however, add or remove jobs for other sockets.