Interface IRpcChannel
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
RemoteEndpoint
Gets a string representation of the remote endpoint.
string RemoteEndpoint { get; }
Property Value
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
Returns
SendAsync(ReadOnlyMemory<byte>, CancellationToken)
Sends a framed message over the channel.
Task SendAsync(ReadOnlyMemory<byte> data, CancellationToken ct = default)
Parameters
dataReadOnlyMemory<byte>ctCancellationToken