SW Task Event Loop Framework v1.0.0
High-performance C++ asynchronous event loop framework with timer management and promise-based programming
Loading...
Searching...
No Matches
sw_task::net::HttpService Class Reference

#include <HttpService.h>

Collaboration diagram for sw_task::net::HttpService:
Collaboration graph

Public Types

using RequestId = std::uint64_t
 

Public Member Functions

 HttpService ()
 
 ~HttpService ()
 
RequestId submit (HttpRequest req)
 
bool cancel (RequestId id)
 
void setMaxConcurrent (std::size_t n)
 
std::size_t pending () const
 
std::size_t activeCount () const
 
std::size_t queuedCount () const
 
void shutdown ()
 

Detailed Description

Definition at line 65 of file HttpService.h.

Member Typedef Documentation

◆ RequestId

using sw_task::net::HttpService::RequestId = std::uint64_t

Definition at line 67 of file HttpService.h.

Constructor & Destructor Documentation

◆ HttpService()

sw_task::net::HttpService::HttpService ( )

Definition at line 7 of file HttpService.cpp.

◆ ~HttpService()

sw_task::net::HttpService::~HttpService ( )

Definition at line 13 of file HttpService.cpp.

References shutdown().

Here is the call graph for this function:

Member Function Documentation

◆ activeCount()

std::size_t sw_task::net::HttpService::activeCount ( ) const

Definition at line 74 of file HttpService.cpp.

◆ cancel()

bool sw_task::net::HttpService::cancel ( RequestId  id)

Definition at line 49 of file HttpService.cpp.

◆ pending()

std::size_t sw_task::net::HttpService::pending ( ) const

Definition at line 69 of file HttpService.cpp.

◆ queuedCount()

std::size_t sw_task::net::HttpService::queuedCount ( ) const

Definition at line 79 of file HttpService.cpp.

◆ setMaxConcurrent()

void sw_task::net::HttpService::setMaxConcurrent ( std::size_t  n)

Definition at line 65 of file HttpService.cpp.

◆ shutdown()

void sw_task::net::HttpService::shutdown ( )

Definition at line 30 of file HttpService.cpp.

Referenced by ~HttpService().

Here is the caller graph for this function:

◆ submit()

HttpService::RequestId sw_task::net::HttpService::submit ( HttpRequest  req)

Definition at line 37 of file HttpService.cpp.


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