|
A11 (C++ runtime)
Native C++ implementation of the A11 action and streaming runtime
|
Namespaces | |
| namespace | internal |
Classes | |
| struct | ByteChunkingOptions |
| Bounds packet size and incomplete-message memory during reassembly. More... | |
| struct | BytePacket |
| Parsed packet metadata plus the owned piece of application payload. More... | |
| class | ByteReassembler |
| Bounded, thread-safe reassembly for interleaved binary messages. More... | |
| struct | ChannelFramingOptions |
| Packetisation and incomplete-message bounds for a binary WireStream. More... | |
| class | ChannelWireStream |
| Shared WireStream lifecycle and framing for binary channels. More... | |
| class | Http2Client |
| An HTTP/2 client connection, reusable across many streams. More... | |
| class | Http2Connection |
| class | Http2DuplexStream |
| Client side of an HTTP/2 extended CONNECT stream. More... | |
| struct | Http2Options |
| Body-size limits, buffering thresholds, deadline, and TLS for an HTTP/2 client or server. More... | |
| class | Http2RequestBodyStream |
| Pull-oriented request DATA for an extended CONNECT stream. More... | |
| class | Http2ResponseStream |
| A pull-oriented HTTP/2 response body stream. More... | |
| class | Http2ResponseWriter |
| Server-side handle for writing an HTTP/2 response to one request. More... | |
| class | Http2Server |
| An HTTP/2 server that dispatches each request to an async handler. More... | |
| struct | Http2TlsOptions |
| TLS settings for an HTTP/2 client or server (certificates, peer verification). More... | |
| struct | HttpRequest |
| A parsed HTTP/2 request: pseudo-headers, fields, and body. More... | |
| struct | HttpResponse |
| A fully buffered HTTP/2 response: head plus complete body. More... | |
| struct | HttpResponseHead |
| Status line and headers of an HTTP/2 response, without the body. More... | |
| class | HttpSseClientWireStream |
| The client-side HTTP SSE wire stream, dialing out to a server URL. More... | |
| struct | HttpSseOptions |
| Endpoint paths and transport tuning for an HTTP SSE wire stream. More... | |
| class | HttpSseServer |
| Hosts HTTP SSE wire streams on top of an HTTP/2 server. More... | |
| class | HttpSseServerWireStream |
| The server-side HTTP SSE wire stream, accepted from a client. More... | |
| class | HttpSseWireStream |
| Common base for the client and server HTTP SSE wire streams. More... | |
| class | InProcessWireStream |
| A WireStream endpoint wired directly to a peer in the same process. More... | |
| class | SignallingEndpoint |
| An identity-bound endpoint into an in-process SignallingService. More... | |
| struct | SignallingMessage |
| One signalling payload: an SDP description, an ICE candidate, or an error. More... | |
| class | SignallingService |
| An in-process broker that routes signalling messages by identity. More... | |
| class | SignallingTransport |
| Abstract identity-bound channel over which signalling flows. More... | |
| struct | TurnServer |
| Address and credentials for a TURN relay used during ICE. More... | |
| struct | WebRtcConfiguration |
| ICE, fragmentation, and binding settings for a WebRTC connection. More... | |
| class | WebRtcWireServer |
| Accepts incoming WebRTC peer connections under a fixed identity. More... | |
| class | WebRtcWireStream |
| A WireStream that carries A11 traffic over a WebRTC data channel. More... | |
| struct | WebSocketClientOptions |
| Client-side tuning for a WebSocketWireStream connection. More... | |
| struct | WebSocketServerOptions |
| Listen address, path, and per-stream defaults for a WebSocketWireServer. More... | |
| class | WebSocketSignallingClient |
| A SignallingTransport that relays messages over a WebSocket. More... | |
| struct | WebSocketSignallingClientOptions |
| Connection tuning for a WebSocketSignallingClient. More... | |
| class | WebSocketSignallingServer |
| Fronts an in-process SignallingService over a WebSocket. More... | |
| struct | WebSocketSignallingServerOptions |
| Listen address and limits for a WebSocketSignallingServer. More... | |
| class | WebSocketWireServer |
| Accepts inbound WebSocket connections and hands each to a callback. More... | |
| class | WebSocketWireStream |
| A WireStream that carries A11 traffic over a client or accepted WebSocket. More... | |
| class | WireStream |
| A bidirectional, message-oriented channel between two A11 endpoints. More... | |
| struct | WireStreamOptions |
| Buffering, sizing, and deadline limits for a WireStream endpoint. More... | |
| class | WireStreamWithRecv |
| Pull-oriented adapter for a callback-driven WireStream. More... | |
Typedefs | |
| using | HttpHeaders = std::vector< std::pair< std::string, std::string > > |
| An ordered list of (name, value) HTTP/2 header fields. | |
| using | Http2RequestHandler = std::function< a11::Task(HttpRequest request, std::shared_ptr< Http2ResponseWriter > response)> |
| Callback dispatched for each inbound request, given a response writer. | |
| using | OnHttpSseConnect = std::function< a11::Task(std::shared_ptr< HttpSseServerWireStream >)> |
| Callback invoked with each accepted server-side SSE wire stream. | |
| using | HttpSseWireStreamServer = HttpSseServer |
| Alias for HttpSseServer, spelled to match the WireStream naming family. | |
| using | OnSignallingMessage = std::function< a11::Task(SignallingMessage message)> |
| Async callback invoked for each inbound SignallingMessage. | |
| using | OnWebRtcStream = std::function< a11::Task(std::shared_ptr< WebRtcWireStream >)> |
| Callback invoked with each newly negotiated peer WireStream. | |
| using | OnWebSocketStream = std::function< a11::Task(std::shared_ptr< WebSocketWireStream >)> |
| Callback invoked with a fresh WireStream for each accepted connection. | |
| using | OnMessage = std::function< a11::Task(std::optional< data::WireMessage > message)> |
Called for each inbound message; std::nullopt signals the peer half-closed. | |
| using | OnDone = std::function< a11::Task()> |
| Called once, when the stream has fully finished (cleanly or via abort). | |
Enumerations | |
| enum class | BytePacketType : std::uint8_t { kCompleteBytes = 0x00 , kByteChunk = 0x01 , kLengthSuffixedByteChunk = 0x02 } |
| Packet shapes in the Action Engine byte-chunking wire format. More... | |
| enum class | ChannelEndpointRole { kClient , kServer , kEither } |
| Handshake role a binary channel endpoint is permitted to assume. More... | |
| enum class | SignallingMessageType { kDescription , kCandidate , kError } |
| The kind of payload a SignallingMessage carries. More... | |
| enum class | TurnRelayType { kUdp , kTcp , kTls } |
| Transport used to reach a TURN relay server. More... | |
Functions | |
| absl::StatusOr< std::vector< std::string > > | SplitBytesIntoPackets (std::string_view bytes, std::uint64_t transient_id, size_t packet_size) |
| Split bytes into Action Engine packets with fixed little-endian suffixes. | |
| absl::StatusOr< BytePacket > | ParseBytePacket (std::string_view packet) |
| Parse and validate one packet without retaining the input view. | |
| void | NormalizeHttpHeaders (HttpHeaders *headers) |
| std::optional< std::string > | GetHttpHeader (const HttpHeaders &headers, std::string_view name) |
| void | EraseHttpHeader (HttpHeaders *headers, std::string_view name) |
| void | SetHttpHeader (HttpHeaders *headers, std::string name, std::string value) |
| absl::Status | ValidateHttpHeaders (const HttpHeaders &headers) |
| void | NormalizeHttpHeaders (HttpHeaders *absl_nonnull headers) |
Lowercases every field name in headers in place. | |
| void | EraseHttpHeader (HttpHeaders *absl_nonnull headers, std::string_view name) |
Removes every field named name from headers. | |
| void | SetHttpHeader (HttpHeaders *absl_nonnull headers, std::string name, std::string value) |
Replaces any existing name fields with a single (name, value) entry. | |
| absl::StatusOr< rtc::Configuration > | BuildLibDataChannelConfiguration (const WebRtcConfiguration &configuration) |
| absl::StatusOr< data::ByteMap > | NormalizeWireHeaders (data::ByteMap headers) |
| Validate and case-normalise a wire header map, returning the normalised copy or a non-OK status if a header name/value is invalid. | |
Variables | |
| constexpr std::string_view | kSseStreamIdHeader = "x-a11-stream-id" |
| Response header naming the stream id assigned to an SSE connection. | |
| constexpr std::string_view | kSseHttpHeaderPrefix = "x-a11-http-" |
| Prefix under which application HTTP headers are tunneled over SSE. | |
| constexpr std::string_view | kDefaultSseConnectEndpoint = "/connect" |
| Default path on which a client opens the SSE event stream. | |
| constexpr std::string_view | kDefaultSseMessageEndpoint |
Default message-post path template ({id} is the stream id). | |
| constexpr std::string_view | kAbortStatusHeader = "x-a11-abort-status" |
| Trailer key under which an aborting endpoint reports its terminal status. | |
| constexpr size_t | kMaxSingleMessageSize = 32 * 1024 * 1024 |
| Hard ceiling on the size of a single reassembled inbound WireMessage. | |
| using a11::net::Http2RequestHandler = typedef std::function<a11::Task( HttpRequest request, std::shared_ptr<Http2ResponseWriter> response)> |
Callback dispatched for each inbound request, given a response writer.
| using a11::net::HttpHeaders = typedef std::vector<std::pair<std::string, std::string> > |
An ordered list of (name, value) HTTP/2 header fields.
Field names are normalized to lowercase. A compact sequence preserves repeated fields and wire order without allocating a tree node per field.
Alias for HttpSseServer, spelled to match the WireStream naming family.
| using a11::net::OnDone = typedef std::function<a11::Task()> |
Called once, when the stream has fully finished (cleanly or via abort).
| using a11::net::OnHttpSseConnect = typedef std::function<a11::Task(std::shared_ptr<HttpSseServerWireStream>)> |
Callback invoked with each accepted server-side SSE wire stream.
| using a11::net::OnMessage = typedef std::function<a11::Task(std::optional<data::WireMessage> message)> |
Called for each inbound message; std::nullopt signals the peer half-closed.
Returns an awaitable the transport awaits before delivering the next message (this is where a consumer applies backpressure).
| using a11::net::OnSignallingMessage = typedef std::function<a11::Task(SignallingMessage message)> |
Async callback invoked for each inbound SignallingMessage.
| using a11::net::OnWebRtcStream = typedef std::function<a11::Task(std::shared_ptr<WebRtcWireStream>)> |
Callback invoked with each newly negotiated peer WireStream.
| using a11::net::OnWebSocketStream = typedef std::function<a11::Task(std::shared_ptr<WebSocketWireStream>)> |
Callback invoked with a fresh WireStream for each accepted connection.
|
strong |
The kind of payload a SignallingMessage carries.
| Enumerator | |
|---|---|
| kDescription | |
| kCandidate | |
| kError | |
|
strong |
| absl::StatusOr< rtc::Configuration > a11::net::BuildLibDataChannelConfiguration | ( | const WebRtcConfiguration & | configuration | ) |
| void a11::net::EraseHttpHeader | ( | HttpHeaders *absl_nonnull | headers, |
| std::string_view | name | ||
| ) |
Removes every field named name from headers.
| void a11::net::EraseHttpHeader | ( | HttpHeaders * | headers, |
| std::string_view | name | ||
| ) |
| std::optional< std::string > a11::net::GetHttpHeader | ( | const HttpHeaders & | headers, |
| std::string_view | name | ||
| ) |
name, or nullopt if absent. | void a11::net::NormalizeHttpHeaders | ( | HttpHeaders *absl_nonnull | headers | ) |
Lowercases every field name in headers in place.
| void a11::net::NormalizeHttpHeaders | ( | HttpHeaders * | headers | ) |
| absl::StatusOr< data::ByteMap > a11::net::NormalizeWireHeaders | ( | data::ByteMap | headers | ) |
Validate and case-normalise a wire header map, returning the normalised copy or a non-OK status if a header name/value is invalid.
| absl::StatusOr< BytePacket > a11::net::ParseBytePacket | ( | std::string_view | packet | ) |
Parse and validate one packet without retaining the input view.
| void a11::net::SetHttpHeader | ( | HttpHeaders *absl_nonnull | headers, |
| std::string | name, | ||
| std::string | value | ||
| ) |
Replaces any existing name fields with a single (name, value) entry.
| void a11::net::SetHttpHeader | ( | HttpHeaders * | headers, |
| std::string | name, | ||
| std::string | value | ||
| ) |
| absl::StatusOr< std::vector< std::string > > a11::net::SplitBytesIntoPackets | ( | std::string_view | bytes, |
| std::uint64_t | transient_id, | ||
| size_t | packet_size | ||
| ) |
Split bytes into Action Engine packets with fixed little-endian suffixes.
| absl::Status a11::net::ValidateHttpHeaders | ( | const HttpHeaders & | headers | ) |
Trailer key under which an aborting endpoint reports its terminal status.
|
inlineconstexpr |
Default path on which a client opens the SSE event stream.
|
inlineconstexpr |
Default message-post path template ({id} is the stream id).
Hard ceiling on the size of a single reassembled inbound WireMessage.
Prefix under which application HTTP headers are tunneled over SSE.