|
A11 (C++ runtime)
Native C++ implementation of the A11 action and streaming runtime
|
WireStream transport over HTTP/2 Server-Sent Events. More...
#include <cstdint>#include <functional>#include <memory>#include <optional>#include <string>#include <absl/base/nullability.h>#include <absl/status/status.h>#include <absl/status/statusor.h>#include <absl/time/time.h>#include "a11/concurrency/future.h"#include "a11/data/types.h"#include "a11/net/http2.h"#include "a11/net/in_process_wire_stream.h"#include "a11/net/wire_stream.h"Go to the source code of this file.
Classes | |
| struct | a11::net::HttpSseOptions |
| Endpoint paths and transport tuning for an HTTP SSE wire stream. More... | |
| class | a11::net::HttpSseWireStream |
| Common base for the client and server HTTP SSE wire streams. More... | |
| class | a11::net::HttpSseClientWireStream |
| The client-side HTTP SSE wire stream, dialing out to a server URL. More... | |
| class | a11::net::HttpSseServerWireStream |
| The server-side HTTP SSE wire stream, accepted from a client. More... | |
| class | a11::net::HttpSseServer |
| Hosts HTTP SSE wire streams on top of an HTTP/2 server. More... | |
Namespaces | |
| namespace | a11 |
| namespace | a11::net |
Typedefs | |
| using | a11::net::OnHttpSseConnect = std::function< a11::Task(std::shared_ptr< HttpSseServerWireStream >)> |
| Callback invoked with each accepted server-side SSE wire stream. | |
| using | a11::net::HttpSseWireStreamServer = HttpSseServer |
| Alias for HttpSseServer, spelled to match the WireStream naming family. | |
Variables | |
| constexpr std::string_view | a11::net::kSseStreamIdHeader = "x-a11-stream-id" |
| Response header naming the stream id assigned to an SSE connection. | |
| constexpr std::string_view | a11::net::kSseHttpHeaderPrefix = "x-a11-http-" |
| Prefix under which application HTTP headers are tunneled over SSE. | |
| constexpr std::string_view | a11::net::kDefaultSseConnectEndpoint = "/connect" |
| Default path on which a client opens the SSE event stream. | |
| constexpr std::string_view | a11::net::kDefaultSseMessageEndpoint |
Default message-post path template ({id} is the stream id). | |
WireStream transport over HTTP/2 Server-Sent Events.
An HttpSseWireStream carries A11 WireMessage traffic over an HTTP/2 channel: the server streams messages back as Server-Sent Events while the client posts outgoing messages to a companion endpoint. Pick this transport when only ordinary HTTP is available – it is a firewall- and proxy-friendly alternative to WebSockets. HttpSseClientWireStream dials out, HttpSseServerWireStream is the accepted counterpart, and HttpSseServer hosts them. Delivery carries no global ordering guarantee but is synchronised on closure – a reader observes every delivered message before the stream completes.