35 AbstractPollOperation
spop;
47 AbstractPollOperation
spop;
53 *hash<ExceptionInfo>
ex;
75 hash<string, hash<PollInfo>>
cache;
173 Queue
submit(hash<SocketPollOperationInfo> info, *
bool replace);
185 hash<SocketPollResultInfo>
exec(hash<SocketPollOperationInfo> info, *
bool replace);
242 *
bool processCommands();
247 doCancelIntern(hash<PollInfo> cinfo);
269 AbstractPollOperation spop;
272 date to = AsyncSocketIoController::DefaultIoOperationTimeout;
Class for controlling async socket I/O.
Definition AsyncSocketIoController.qc.dox.h:60
Mutex m()
Lock for atomic actions.
Queue submit(hash< SocketPollOperationInfo > info, *bool replace)
Submits a socket operation to be performed and returns a Queue where the results will be returned.
Queue cmdq()
I/O thread command queue.
Counter mcnt()
I/O thread counter.
int tid
I/O thread TID.
Definition AsyncSocketIoController.qc.dox.h:78
constructorInit()
Common constructor code.
const IO_ADD
I/O thread command: add.
Definition AsyncSocketIoController.qc.dox.h:84
const IO_QUIT
I/O thread command: quit.
Definition AsyncSocketIoController.qc.dox.h:90
constructor(*LoggerInterface logger)
Creates the object.
bool running()
Returns True if the I/O thread is running.
cancelIntern(string uh)
Cancels an operation in progress and sends an appropriate message on the result queue.
bool getAutostop()
Get autostop flag.
ReadOnlyFile sem_read
File to read in the I/O thread.
Definition AsyncSocketIoController.qc.dox.h:99
const DefaultIoOperationTimeout
Default I/O timeout duration.
Definition AsyncSocketIoController.qc.dox.h:68
stopClear()
Stops monitoring and clears all connections.
File sem_write
File to signal the I/O thread.
Definition AsyncSocketIoController.qc.dox.h:96
hash< SocketPollInfo > sem_info
Semaphore descriptor info.
Definition AsyncSocketIoController.qc.dox.h:102
hash< auto > getInfo()
Returns information about the object.
const PollEventMap
Polling event map.
Definition AsyncSocketIoController.qc.dox.h:64
destructor()
Stops the monitoring thread and destroys the object.
bool cancel(Socket sock)
Cancels any operation in progress for the given Socket.
start()
Starts monitoring.
bool autostop
Stop monitoring thread when the last operation is complete.
Definition AsyncSocketIoController.qc.dox.h:81
hash< string, hash< PollInfo > > cache
Socket cache; unique hash -> poll info.
Definition AsyncSocketIoController.qc.dox.h:75
constructor(bool autostop, *LoggerInterface logger)
For listener sockets.
setAutostop(bool autostop=True)
Set autostop flag.
const IO_CANCEL
I/O thread command: cancel.
Definition AsyncSocketIoController.qc.dox.h:87
cancelEx(Socket sock)
Cancels any operation in progress for the given Socket.
waitStop()
Waits for the monitoring thread to stop if it's running.
hash< string, Condition > cancel_cond_map
Cancel operation waiting Condition; socket unique key -> Condition.
Definition AsyncSocketIoController.qc.dox.h:111
hash< SocketPollResultInfo > exec(hash< SocketPollOperationInfo > info, *bool replace)
Executes a socket operation asynchronously and waits for the results.
The AsyncSocketIo namespace.
Definition AsyncSocketIo.qm.dox.h:51
Socket polling operation info hash.
Definition AsyncSocketIoController.qc.dox.h:30
date to
I/O timeout.
Definition AsyncSocketIoController.qc.dox.h:38
*hash< auto > other
Free-form data to be returned when the operation completes.
Definition AsyncSocketIoController.qc.dox.h:41
AbstractPollOperation spop
Poll operation.
Definition AsyncSocketIoController.qc.dox.h:35
Socket sock
Socket object.
Definition AsyncSocketIoController.qc.dox.h:32
Socket poll result.
Definition AsyncSocketIoController.qc.dox.h:45
*hash< auto > other
Free-form data provided when the operation was submitted.
Definition AsyncSocketIoController.qc.dox.h:56
AbstractPollOperation spop
The poll operation that completed.
Definition AsyncSocketIoController.qc.dox.h:47
*bool canceled
If the operation was canceled.
Definition AsyncSocketIoController.qc.dox.h:50
*hash< ExceptionInfo > ex
Any exception raised while executing the operation.
Definition AsyncSocketIoController.qc.dox.h:53