Table of Contents

Struct RpcFrame

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

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

payload Payload

RpcFrame(PooledBufferWriter)

public RpcFrame(PooledBufferWriter writer)

Parameters

writer PooledBufferWriter

Properties

Length

public int Length { get; }

Property Value

int

Memory

public ReadOnlyMemory<byte> Memory { get; }

Property Value

ReadOnlyMemory<byte>

Methods

DetachPayload()

public Payload DetachPayload()

Returns

Payload

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()