Module websocket

Source

Structs§

Client
The Relay WebSocket RPC client.
ClientStream
Lower-level FusedStream interface for the client connection.
CloseFrame
A struct representing the close command.
CloseReason
Wrapper around the websocket CloseFrame providing info about the connection closing reason.
EmptyResponseFuture
Future that resolves with the RPC response, consuming it and returning Result<(), Error>.
FetchMessageStream
Stream that uses the irn_batchFetch RPC method to retrieve messages from the Relay.
InboundRequest
The lower-level inbound RPC request.
OutboundRequest
An outbound request wrapper created by create_request(). Intended be used with [ClientStream][crate::client::ClientStream].
PublishedMessage
The message received from a subscription.
ResponseFuture
Future that resolves with the RPC response for the specified request.

Enums§

StreamEvent
Possible events produced by the ClientStream.
WebsocketClientError

Traits§

ConnectionHandler
Handlers for the RPC stream events.

Functions§

create_request
Creates an RPC request and returns a tuple of the request and a response future. The request is intended to be used with [ClientStream][crate::client::ClientStream].
create_stream
Opens a connection to the Relay and returns ClientStream for the connection.

Type Aliases§

SocketStream
TransportError