|
A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
|
Endpoint paths and transport tuning for an HTTP SSE wire stream. More...
#include <cpp/a11/net/http_sse_wire_stream.h>
Public Member Functions | |
| absl::Status | Validate () const |
Public Attributes | |
| WireStreamOptions | stream_options |
| Per-stream buffering and deadline. | |
| Http2Options | http2_options |
| Shared HTTP/2 transport and TLS policy. | |
| std::string | connect_endpoint |
| SSE connect POST path. | |
| std::string | connect_endpoint_prefix |
| Server-side: also accept a connect POST anywhere under this prefix. | |
| std::string | message_endpoint |
| Outbound endpoint template. | |
| SseOutboundDelivery | outbound = SseOutboundDelivery::kPost |
| Client-side outbound delivery method; servers accept either. | |
| DescribeEndpointOptions | describe |
Server-side: GET /actions, when something above filled in the handler. | |
| bool | accept_streamed_outbound = true |
| Server-side: whether a streamed outbound request body is accepted, and so advertised in kSseOutboundModesHeader. | |
| size_t | max_concurrent_posts = 16 |
| Outbound POSTs a client keeps in flight at once (kPost only). | |
| ServerHeaderOptions | headers |
Server-side response-header policy: the Server header, cross-origin access, and the hints that tell a client and its intermediaries how to treat a reply. | |
Endpoint paths and transport tuning for an HTTP SSE wire stream.
A POST to connect_endpoint opens the SSE event stream; message_endpoint (a path template containing the stream id) receives outbound messages, either one per POST or as one streamed request body. http2_options and stream_options tune the underlying transport.
| absl::Status a11::net::HttpSseOptions::Validate | ( | ) | const |
| bool a11::net::HttpSseOptions::accept_streamed_outbound = true |
Server-side: whether a streamed outbound request body is accepted, and so advertised in kSseOutboundModesHeader.
Clearing it leaves clients with POST-per-message – which is what an intermediary that will not carry a long-lived request body forces, and over HTTP/1.1 costs a connection per message.
| std::string a11::net::HttpSseOptions::connect_endpoint |
SSE connect POST path.
| std::string a11::net::HttpSseOptions::connect_endpoint_prefix |
Server-side: also accept a connect POST anywhere under this prefix.
Empty by default, which serves exactly one endpoint. Set it to serve many on one port – one per agent, say – and read the rest of the path from HttpSseWireStream::GetRequestPath() in the on_connect handler. Must start and end with '/'. The message endpoint is unaffected: an outbound POST is correlated by the stream id it carries, not by its route.
| DescribeEndpointOptions a11::net::HttpSseOptions::describe |
Server-side: GET /actions, when something above filled in the handler.
See a11/net/describe_endpoint.h for why this is a callback.
| ServerHeaderOptions a11::net::HttpSseOptions::headers |
Server-side response-header policy: the Server header, cross-origin access, and the hints that tell a client and its intermediaries how to treat a reply.
Permissive by default, because a browser is a first-class A11 client. See a11/net/server_headers.h.
| Http2Options a11::net::HttpSseOptions::http2_options |
Shared HTTP/2 transport and TLS policy.
| size_t a11::net::HttpSseOptions::max_concurrent_posts = 16 |
Outbound POSTs a client keeps in flight at once (kPost only).
One restores the strictly serialised behaviour; the bound is what stops a fast producer from spending every stream on the HTTP/2 connection at once.
| std::string a11::net::HttpSseOptions::message_endpoint |
Outbound endpoint template.
| SseOutboundDelivery a11::net::HttpSseOptions::outbound = SseOutboundDelivery::kPost |
Client-side outbound delivery method; servers accept either.
| WireStreamOptions a11::net::HttpSseOptions::stream_options |
Per-stream buffering and deadline.