The ClientJanitor stores all open Sockets in a pool to optimize consecutive calls. Only use it if you know what you are doing.
More...
#include <Client.hpp>
|
| std::mutex | poolMutex |
| |
| std::unordered_map< Hermes::IpEndpoint, std::vector< std::shared_ptr< Socket > > > | connectionPool |
| | Group multiple sockets connected to the same endpoint. Before using it lock the poolMutex to not break other threads.
|
| |
The ClientJanitor stores all open Sockets in a pool to optimize consecutive calls. Only use it if you know what you are doing.
Please use poolMutex while accessing connectionPool to not break other threads. Each 30s it will destruct sockets unused for more than 1 minute.
◆ Instance()
◆ JanitorLoop()
| void Thoth::Http::ClientJanitor::JanitorLoop |
( |
| ) |
|
◆ connectionPool
| std::unordered_map<Hermes::IpEndpoint, std::vector<std::shared_ptr<Socket> > > Thoth::Http::ClientJanitor::connectionPool |
Group multiple sockets connected to the same endpoint. Before using it lock the poolMutex to not break other threads.
◆ poolMutex
| std::mutex Thoth::Http::ClientJanitor::poolMutex |
The documentation for this struct was generated from the following file: