12 #ifndef ROC_NETIO_NETWORK_TASK_H_
13 #define ROC_NETIO_NETWORK_TASK_H_
18 #include "roc_core/semaphore.h"
26 class INetworkTaskCompleter;
Base class for MpscQueue element.
Optionally constructed object.
Shared ownership intrusive pointer.
Network task completion handler.
Network event loop thread.
Base class for network loop tasks.
core::SharedPtr< BasicPort > port_
On which port the task operates.
void(NetworkLoop::* func_)(NetworkTask &)
Task implementation method.
void * port_handle_
Port handle.
INetworkTaskCompleter * completer_
Completion handler.
core::Atomic< int > state_
Task state, defines whether task is finished already. The task becomes immutable after setting state ...
bool success() const
Check that the task finished and succeeded.
core::Optional< core::Semaphore > sem_
Completion semaphore.
core::Atomic< int > success_
Task result, defines wether finished task succeeded or failed. Makes sense only after setting state_ ...
Optionally constructed object.
Shared ownership intrusive pointer.