|
FastMM C++ API 0.14.0
Public headers, tier 1 and tier 2
|
BlockingHttp: synchronous HTTP(S) requests on a private Reactor + HttpClient. More...
#include "fastmm/net/http_message.hpp"#include "fastmm/net/source_address.hpp"#include "fastmm/net/tcp_socket.hpp"#include <cstddef>#include <cstdint>#include <memory>#include <optional>#include <string>#include <string_view>#include <utility>#include <vector>Go to the source code of this file.
Classes | |
| struct | fastmm::venues::HttpReply |
| struct | fastmm::venues::BlockingHttpOptions |
| class | fastmm::venues::BlockingHttp |
Namespaces | |
| namespace | fastmm |
| namespace | fastmm::venues |
BlockingHttp: synchronous HTTP(S) requests on a private Reactor + HttpClient.
Used only on control paths that must not depend on the venue's reactor thread being alive: reference data at startup, server-time probes, and the kill-switch cancel_all (6.7: "independent REST connection"). Allocates freely; never touched by the hot path.
One object keeps its connection between requests (HTTP/1.1 keep-alive) and the addresses it looked up: the kill switch cancels symbol after symbol, and a connection per request paid a lookup, a CA bundle load, the TCP and TLS handshakes and the request each time. The TLS context is the process's (net::TlsContext::shared_client). A connection idle for more than kReuseIdleMs is not reused, nor one the server has closed. A request whose reused connection turns out to be gone before any answer is sent again on a new one, unless it is a POST (it may have been carried out). Not thread-safe: one thread at a time.