DDraceNetwork Docs
CHttp Class Reference

#include <http.h>

Inheritance diagram for CHttp:
[legend]
Collaboration diagram for CHttp:
[legend]

Public Member Functions

bool Init (std::chrono::milliseconds ShutdownDelay)
 
virtual void Run (std::shared_ptr< IHttpRequest > pRequest) override
 
void Shutdown () override
 
 ~CHttp ()
 
virtual void Run (std::shared_ptr< IHttpRequest > pRequest)=0
 
- Public Member Functions inherited from IInterface
 IInterface ()
 
virtual void Shutdown ()
 
virtual ~IInterface ()
 

Private Types

enum  EState { UNINITIALIZED , RUNNING , ERROR }
 

Private Member Functions

void RunLoop ()
 

Static Private Member Functions

static void ThreadMain (void *pUser)
 

Private Attributes

void * m_pThread = nullptr
 
std::mutex m_Lock {}
 
std::condition_variable m_Cv {}
 
std::atomic< EStatem_State = UNINITIALIZED
 
std::deque< std::shared_ptr< CHttpRequest > > m_PendingRequests {}
 
std::unordered_map< void *, std::shared_ptr< CHttpRequest > > m_RunningRequests {}
 
std::chrono::milliseconds m_ShutdownDelay {}
 
std::optional< std::chrono::time_point< std::chrono::steady_clock > > m_ShutdownTime {}
 
std::atomic< bool > m_Shutdown = false
 
void * m_pMultiH = nullptr
 

Additional Inherited Members

- Static Public Member Functions inherited from IHttp
static const char * InterfaceName ()
 
- Protected Member Functions inherited from IInterface
IKernelKernel ()
 

Member Enumeration Documentation

◆ EState

enum CHttp::EState
private
Enumerator
UNINITIALIZED 
RUNNING 
ERROR 

Constructor & Destructor Documentation

◆ ~CHttp()

CHttp::~CHttp ( )

Member Function Documentation

◆ Init()

bool CHttp::Init ( std::chrono::milliseconds  ShutdownDelay)

◆ Run()

void CHttp::Run ( std::shared_ptr< IHttpRequest pRequest)
overridevirtual

Implements IHttp.

◆ RunLoop()

void CHttp::RunLoop ( )
private

◆ Shutdown()

void CHttp::Shutdown ( )
overridevirtual

Reimplemented from IInterface.

◆ ThreadMain()

void CHttp::ThreadMain ( void *  pUser)
staticprivate

Member Data Documentation

◆ m_Cv

std::condition_variable CHttp::m_Cv {}
private

◆ m_Lock

std::mutex CHttp::m_Lock {}
private

◆ m_PendingRequests

std::deque<std::shared_ptr<CHttpRequest> > CHttp::m_PendingRequests {}
private

◆ m_pMultiH

void* CHttp::m_pMultiH = nullptr
private

◆ m_pThread

void* CHttp::m_pThread = nullptr
private

◆ m_RunningRequests

std::unordered_map<void *, std::shared_ptr<CHttpRequest> > CHttp::m_RunningRequests {}
private

◆ m_Shutdown

std::atomic<bool> CHttp::m_Shutdown = false
private

◆ m_ShutdownDelay

std::chrono::milliseconds CHttp::m_ShutdownDelay {}
private

◆ m_ShutdownTime

std::optional<std::chrono::time_point<std::chrono::steady_clock> > CHttp::m_ShutdownTime {}
private

◆ m_State

std::atomic<EState> CHttp::m_State = UNINITIALIZED
private

The documentation for this class was generated from the following files: