Skip to content

WebsocketTransport

Category: Jsonrpc

Source: websocket_transport.dart

WebSocket-backed implementation of [JsonRpcTransport].

Each WebSocket message frame is one JSON-RPC message — no line-delimited framing needed (the WS layer already preserves message boundaries). Outbound JsonRpcMessages are serialized as JSON text frames; inbound text frames are parsed; binary frames are silently dropped (we don't speak any binary JSON-RPC variant).

Classes

WebSocketTransport

Constructor

dart
WebSocketTransport(this._socket)

Properties

PropertyTypeDescription
incomingStream<JsonRpcMessage> get

Methods

void send(JsonRpcMessage message)
Future<void> close()

Released under the MIT License.