Helps keep track of open evhttp_connection
s with active evhttp_requests
More...
Helps keep track of open evhttp_connection
s with active evhttp_requests
Definition at line 158 of file httpserver.cpp.
◆ AddRequest()
void HTTPRequestTracker::AddRequest |
( |
evhttp_request * |
req | ) |
|
|
inline |
Increase request counter for the associated connection by 1.
Definition at line 173 of file httpserver.cpp.
◆ CountActiveConnections()
size_t HTTPRequestTracker::CountActiveConnections |
( |
| ) |
const |
|
inline |
◆ GUARDED_BY()
std::unordered_map< const evhttp_connection *, size_t > m_tracker HTTPRequestTracker::GUARDED_BY |
( |
m_mutex |
| ) |
|
|
private |
For each connection, keep a counter of how many requests are open.
◆ RemoveConnection()
void HTTPRequestTracker::RemoveConnection |
( |
const evhttp_connection * |
conn | ) |
|
|
inline |
◆ RemoveConnectionInternal()
void HTTPRequestTracker::RemoveConnectionInternal |
( |
const decltype(m_tracker)::iterator |
it | ) |
|
|
inlineprivate |
◆ RemoveRequest()
void HTTPRequestTracker::RemoveRequest |
( |
evhttp_request * |
req | ) |
|
|
inline |
Decrease request counter for the associated connection by 1, remove connection if counter is 0.
Definition at line 179 of file httpserver.cpp.
◆ WaitUntilEmpty()
void HTTPRequestTracker::WaitUntilEmpty |
( |
| ) |
const |
|
inline |
Wait until there are no more connections with active requests in the tracker.
Definition at line 200 of file httpserver.cpp.
◆ m_cv
std::condition_variable HTTPRequestTracker::m_cv |
|
mutableprivate |
◆ m_mutex
Mutex HTTPRequestTracker::m_mutex |
|
mutableprivate |
The documentation for this class was generated from the following file: