An HTTP/2 server that dispatches each request to an async handler.
More...
#include <cpp/a11/net/http2.h>
An HTTP/2 server that dispatches each request to an async handler.
The listening endpoint underlying the WebSocket and HTTP SSE server transports; also usable directly for plain HTTP/2 services.
◆ ~Http2Server()
| a11::net::Http2Server::~Http2Server |
( |
| ) |
|
◆ bind_address()
| std::string a11::net::Http2Server::bind_address |
( |
| ) |
const |
- Returns
- The address the server is bound to.
◆ Create()
Creates and starts an HTTP/2 server.
- Parameters
-
| bind_address | Local address to bind to. |
| port | TCP port to listen on; 0 selects an ephemeral port. |
| handler | Async callback invoked for each request. |
| options | Body limits, buffering, deadline, and TLS settings. |
- Returns
- The running server, or an error status.
◆ GetImpl()
| void *absl_nullable a11::net::Http2Server::GetImpl |
( |
| ) |
const |
- Returns
- An opaque native handle for advanced interop, or nullptr.
◆ port()
| std::uint16_t a11::net::Http2Server::port |
( |
| ) |
const |
- Returns
- The port listened on, resolved even for an ephemeral 0.
◆ running()
| bool a11::net::Http2Server::running |
( |
| ) |
const |
- Returns
- Whether the server is currently running.
◆ secure()
| bool a11::net::Http2Server::secure |
( |
| ) |
const |
- Returns
- Whether the server is using TLS.
◆ Stop()
| absl::Status a11::net::Http2Server::Stop |
( |
| ) |
|
Stops the server and releases its resources.
The documentation for this class was generated from the following files: