Struct RpcFrame
Owns one received wire frame. The frame can be backed by the legacy Payload owner or by a pooled writer transferred by a low-allocation transport.
This is a value type and may be copied. Ownership of the underlying Payload or
PooledBufferWriter transfers only through DetachPayload(); otherwise
callers dispose it through Dispose(). Follow the boolean contract returned by
RpcPeerFrameProcessor.ShouldDisposeAsync inside RpcPeerReadLoop: true
means the caller owns the frame, false means the read loop retained ownership
(for example, a StreamItem). Both backing owners are idempotent, so double-dispose is safe.
public struct RpcFrame : IDisposable
- Implements
- Inherited Members
Constructors
RpcFrame(Payload)
public RpcFrame(Payload payload)
Parameters
payloadPayload
RpcFrame(PooledBufferWriter)
public RpcFrame(PooledBufferWriter writer)
Parameters
writerPooledBufferWriter
Properties
Length
public int Length { get; }
Property Value
Memory
public ReadOnlyMemory<byte> Memory { get; }
Property Value
Methods
DetachPayload()
public Payload DetachPayload()
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()