Interface IRpcFrameChannel
Namespace: DotBoxD.Services.Transport
Assembly: DotBoxD.Services.dll
Optional low-allocation transport contract for channels that can transfer ownership
of complete pooled frames instead of copying them into a new DotBoxD.Services.Buffers.Payload.
public interface IRpcFrameChannel : IRpcValueTaskChannel, IRpcChannel, IAsyncDisposableImplements
Section titled “Implements”IRpcValueTaskChannel, IRpcChannel, IAsyncDisposable
Methods
Section titled “Methods”ReceiveFrameValueAsync(CancellationToken)
Section titled “ ReceiveFrameValueAsync(CancellationToken)”Receives a complete frame whose ownership transfers to the caller on successful completion.
ValueTask<RpcFrame> ReceiveFrameValueAsync(CancellationToken ct = default)Parameters
Section titled “Parameters”Returns
Section titled “Returns”Remarks
Section titled “Remarks”The caller must consume the returned logical frame exactly once by calling either
DotBoxD.Services.Transport.RpcFrame.DetachPayload or DotBoxD.Services.Transport.RpcFrame.Dispose.
SendFrameValueAsync(PooledBufferWriter, CancellationToken)
Section titled “ SendFrameValueAsync(PooledBufferWriter, CancellationToken)”Sends a complete pooled frame and transfers its ownership to the channel.
ValueTask SendFrameValueAsync(PooledBufferWriter frame, CancellationToken ct = default)Parameters
Section titled “Parameters”frame PooledBufferWriter
Returns
Section titled “Returns”Remarks
Section titled “Remarks”Ownership transfers immediately when this invocation returns a System.Threading.Tasks.ValueTask,
including an already faulted or canceled result. The channel then owns
frame through terminal success, failure, or cancellation and must dispose
it; the caller must not read, detach, or dispose it. If the invocation throws synchronously,
ownership remains with the caller, which must dispose the frame. The implementation must drop
its raw writer reference when the returned operation terminates.
Exceptions
Section titled “Exceptions”frame is null.