Deskflow 1.22.0.197
Keyboard and mouse sharing utility
|
Use a method as a socket multiplexer job. More...
#include <TSocketMultiplexerMethodJob.h>
Public Types | |
using | Method = ISocketMultiplexerJob *(T::*)(ISocketMultiplexerJob *, bool, bool, bool) |
Public Member Functions | |
TSocketMultiplexerMethodJob (T *object, Method method, ArchSocket socket, bool readable, bool writeable) | |
run() invokes object->method(arg) | |
TSocketMultiplexerMethodJob (TSocketMultiplexerMethodJob const &)=delete | |
TSocketMultiplexerMethodJob (TSocketMultiplexerMethodJob &&)=delete | |
~TSocketMultiplexerMethodJob () override | |
TSocketMultiplexerMethodJob & | operator= (TSocketMultiplexerMethodJob const &)=delete |
TSocketMultiplexerMethodJob & | operator= (TSocketMultiplexerMethodJob &&)=delete |
ISocketMultiplexerJob * | run (bool readable, bool writable, bool error) override |
Handle socket event. | |
ArchSocket | getSocket () const override |
Get the socket. | |
bool | isReadable () const override |
Check for interest in readability. | |
bool | isWritable () const override |
Check for interest in writability. | |
Public Member Functions inherited from ISocketMultiplexerJob | |
Public Member Functions inherited from IInterface | |
virtual | ~IInterface ()=default |
Interface destructor does nothing. |
Use a method as a socket multiplexer job.
A socket multiplexer job class that invokes a member function.
using TSocketMultiplexerMethodJob< T >::Method = ISocketMultiplexerJob *(T::*)(ISocketMultiplexerJob *, bool, bool, bool) |
|
inline |
run() invokes object->method(arg)
|
delete |
|
delete |
|
inlineoverride |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Check for interest in readability.
Return true if the job is interested in being run if the socket becomes readable.
Implements ISocketMultiplexerJob.
|
inlineoverridevirtual |
Check for interest in writability.
Return true if the job is interested in being run if the socket becomes writable.
Implements ISocketMultiplexerJob.
|
delete |
|
delete |
|
inlineoverridevirtual |
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 nullptr 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 addSocket()
or removeSocket()
on the multiplexer. It must instead return the new job. It can, however, add or remove jobs for other sockets.
Implements ISocketMultiplexerJob.