|
A11 (C++ runtime)
Native C++ implementation of the A11 action and streaming runtime
|
Hosts HTTP SSE wire streams on top of an HTTP/2 server. More...
#include <cpp/a11/net/http_sse_wire_stream.h>
Classes | |
| struct | State |
Public Member Functions | |
| ~HttpSseServer () | |
| a11::Future< std::shared_ptr< HttpSseServerWireStream > > | WaitForStream () |
| absl::Status | Stop () |
| Stops the server and releases its resources. | |
| std::uint16_t | port () const |
| bool | running () const |
| std::shared_ptr< Http2Server > | http2_server () const |
Static Public Member Functions | |
| static absl::StatusOr< std::shared_ptr< HttpSseServer > > | Create (std::string bind_address, std::uint16_t port, OnHttpSseConnect on_connect={}, HttpSseOptions options={}) |
| Creates and starts an SSE server accepting A11 wire streams. | |
Friends | |
| class | HttpSseServerWireStream |
Hosts HTTP SSE wire streams on top of an HTTP/2 server.
Accepts A11 clients connecting over HTTP/2 SSE. Either supply an on_connect callback invoked per stream, or pull streams explicitly with WaitForStream().
| a11::net::HttpSseServer::~HttpSseServer | ( | ) |
|
static |
Creates and starts an SSE server accepting A11 wire streams.
| bind_address | Local address to bind to. |
| port | TCP port to listen on; 0 selects an ephemeral port. |
| on_connect | Optional callback invoked for each accepted stream. |
| options | Endpoint paths and transport tuning. |
| std::shared_ptr< Http2Server > a11::net::HttpSseServer::http2_server | ( | ) | const |
| std::uint16_t a11::net::HttpSseServer::port | ( | ) | const |
| bool a11::net::HttpSseServer::running | ( | ) | const |
| absl::Status a11::net::HttpSseServer::Stop | ( | ) |
Stops the server and releases its resources.
| a11::Future< std::shared_ptr< HttpSseServerWireStream > > a11::net::HttpSseServer::WaitForStream | ( | ) |
|
friend |