Interface IRpcChannel
Namespace: DotBoxD.Services.Transport
Assembly: DotBoxD.Services.dll
A duplex, framed, bidirectional channel — the transport unit a DotBoxD.Services.Peer.RpcPeer
runs on. Responses flow back over the same channel, so it is always bidirectional even when the
call direction is one-way. Transports return this directly; implement it to add a custom transport.
public interface IRpcChannel : IAsyncDisposableImplements
Section titled “Implements”Properties
Section titled “Properties”IsConnected
Section titled “ IsConnected”Gets whether the channel is currently connected.
bool IsConnected { get; }Property Value
Section titled “Property Value”RemoteEndpoint
Section titled “ RemoteEndpoint”Gets a string representation of the remote endpoint.
string RemoteEndpoint { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”ReceiveAsync(CancellationToken)
Section titled “ ReceiveAsync(CancellationToken)”Receives a framed message. The caller owns the returned DotBoxD.Services.Buffers.Payload and must
dispose it. A payload with DotBoxD.Services.Buffers.Payload.Length of 0 signals the channel was closed.
Task<Payload> ReceiveAsync(CancellationToken ct = default)Parameters
Section titled “Parameters”Returns
Section titled “Returns”SendAsync(ReadOnlyMemory<byte>, CancellationToken)
Section titled “ SendAsync(ReadOnlyMemory<byte>, CancellationToken)”Sends a framed message over the channel.
Task SendAsync(ReadOnlyMemory<byte> data, CancellationToken ct = default)Parameters
Section titled “Parameters”data ReadOnlyMemory<byte>