Table of Contents

Interface IRpcChannel

Namespace
DotBoxD.Services.Transport
Assembly
DotBoxD.Services.dll

A duplex, framed, bidirectional channel — the transport unit a 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 : IAsyncDisposable
Inherited Members

Properties

IsConnected

Gets whether the channel is currently connected.

bool IsConnected { get; }

Property Value

bool

RemoteEndpoint

Gets a string representation of the remote endpoint.

string RemoteEndpoint { get; }

Property Value

string

Methods

ReceiveAsync(CancellationToken)

Receives a framed message. The caller owns the returned Payload and must dispose it. A payload with Length of 0 signals the channel was closed.

Task<Payload> ReceiveAsync(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<Payload>

SendAsync(ReadOnlyMemory<byte>, CancellationToken)

Sends a framed message over the channel.

Task SendAsync(ReadOnlyMemory<byte> data, CancellationToken ct = default)

Parameters

data ReadOnlyMemory<byte>
ct CancellationToken

Returns

Task