|
A11 (C++ runtime)
Native C++ implementation of the A11 action and streaming runtime
|
A WireStream that carries A11 traffic over a client or accepted WebSocket. More...
#include <cpp/a11/net/websocket_wire_stream.h>
Public Member Functions | |
| WebSocketWireStream (ConstructorToken, std::shared_ptr< State > state) | |
Public Member Functions inherited from a11::net::ChannelWireStream | |
| ~ChannelWireStream () override | |
| absl::Status | Send (data::WireMessage message) override |
| Enqueue a message for delivery to the peer. | |
| a11::Task | Start (OnMessage on_message, OnDone on_done) override |
| Begin the stream as the initiating ("start") side. | |
| a11::Task | Accept (OnMessage on_message, OnDone on_done) override |
| Begin the stream as the accepting ("accept") side. | |
| absl::Status | HalfClose (data::ByteMap trailers) override |
| Signal that this side will send no more messages. | |
| a11::Task | DrainOutgoingMessages () override |
| Await delivery of all buffered outbound messages. | |
| absl::Status | Abort (absl::Status status) override |
| Abort the stream, discarding buffered work. | |
| absl::Status | SetDeadline (absl::Time deadline) override |
| Set the absolute deadline after which the stream is aborted. | |
| absl::Time | deadline () const override |
| absl::Status | GetStatus () const override |
| std::optional< data::ByteMap > | GetTrailers () const override |
| std::string | GetId () const override |
| void *absl_nullable | GetImpl () const override |
| absl::Status | HalfClose () |
| Half-close with no trailers. | |
| virtual absl::Status | HalfClose (data::ByteMap trailers)=0 |
| Signal that this side will send no more messages. | |
| absl::Status | SetDeadline () |
| Clear any deadline (equivalent to an infinite deadline). | |
| virtual absl::Status | SetDeadline (absl::Time deadline)=0 |
| Set the absolute deadline after which the stream is aborted. | |
Public Member Functions inherited from a11::net::WireStream | |
| virtual | ~WireStream ()=default |
| absl::Status | HalfClose () |
| Half-close with no trailers. | |
| absl::Status | SetDeadline () |
| Clear any deadline (equivalent to an infinite deadline). | |
Static Public Member Functions | |
| static absl::StatusOr< std::shared_ptr< WebSocketWireStream > > | CreateClient (std::string url, WireStreamOptions options={}, WebSocketClientOptions websocket_options={}) |
| Dials a WebSocket endpoint and returns a WireStream over it. | |
Friends | |
| class | WebSocketWireServer |
Additional Inherited Members | |
Public Types inherited from a11::net::ChannelWireStream | |
| using | OpenOperation = std::function< absl::Status()> |
| Transport-specific operation that initiates or accepts the channel. | |
Protected Member Functions inherited from a11::net::ChannelWireStream | |
| ChannelWireStream (std::shared_ptr< State > state) | |
Static Protected Member Functions inherited from a11::net::ChannelWireStream | |
| static absl::StatusOr< std::shared_ptr< State > > | MakeState (std::shared_ptr< internal::BinaryChannel > channel, std::string id, ChannelEndpointRole role, OpenOperation open_operation, WireStreamOptions options, ChannelFramingOptions framing={}) |
A WireStream that carries A11 traffic over a client or accepted WebSocket.
Client instances are created with CreateClient(); server-accepted instances are produced by WebSocketWireServer. Framing and message delivery are handled by the ChannelWireStream base.
|
inlineexplicit |
|
static |
Dials a WebSocket endpoint and returns a WireStream over it.
| url | The ws:// or wss:// URL of the remote A11 endpoint. |
| options | Transport-level WireStreamOptions (buffering, deadlines). |
| websocket_options | Handshake headers, framing, HTTP/2 and TLS settings. |
|
friend |