kodi
|
The PLT_HttpListenTask class is used by a PLT_HttpServer to listen for incoming connections and spawn a new task for handling each request. More...
#include <PltHttpServerTask.h>
Public Member Functions | |
PLT_HttpListenTask (NPT_HttpRequestHandler *handler, NPT_TcpServerSocket *socket, bool owns_socket=true) | |
![]() | |
NPT_Result | Kill () |
When a task is not managed by a PLT_TaskManager, the owner must call this to stop and destroy it. | |
Protected Member Functions | |
void | DoAbort () override |
This method to override in derived classes is called when the task is about to stop. | |
void | DoRun () override |
This method to override in derived classes is the main task loop. | |
![]() | |
virtual bool | IsAborting (NPT_Timeout timeout) |
Return whether this task is in the process of stopping. More... | |
NPT_Result | Start (PLT_TaskManager *task_manager=NULL, NPT_TimeInterval *delay=NULL, bool auto_destroy=true) |
Start a task by associating it with a task manager. More... | |
NPT_Result | Stop (bool blocking=true) |
Stop the task. More... | |
virtual void | DoInit () |
This method to override in derived classes is called when the task is about to start. | |
PLT_ThreadTask () | |
A PLT_ThreadTask base class is never instantiated directly. | |
~PLT_ThreadTask () override | |
The task manager will destroy the task when finished if m_AutoDestroy is true otherwise the owner of this task must use the Kill method. | |
Protected Attributes | |
NPT_HttpRequestHandler * | m_Handler |
NPT_TcpServerSocket * | m_Socket |
bool | m_OwnsSocket |
![]() | |
PLT_TaskManager * | m_TaskManager |
The PLT_HttpListenTask class is used by a PLT_HttpServer to listen for incoming connections and spawn a new task for handling each request.