Table of Contents

Struct PooledFrame

Namespace
KernLab.Cell.Contracts
Assembly
KernLab.Cell.Contracts.dll

收帧载体——池化租借的一整帧体;用毕 Dispose() 归还(热路径零稳态分配)。

public readonly struct PooledFrame : IDisposable
Implements
Inherited Members

Constructors

PooledFrame(byte[], int)

构造(rented 为池化租借缓冲)。

public PooledFrame(byte[] rented, int length)

Parameters

rented byte[]
length int

Properties

Length

帧体字节数([Tag 1B][字段]——不含长度前缀)。

public int Length { get; }

Property Value

int

Span

帧体(原位可解——CellFrameCodec.TryDecode(ReadOnlySpan<byte>, out CellFrame) 直取)。

public ReadOnlySpan<byte> Span { get; }

Property Value

ReadOnlySpan<byte>

Methods

Dispose()

归还池。

public void Dispose()