Table of Contents

Method GetMemory

Namespace
NATS.Client.Core
Assembly
NATS.Client.Core.dll

GetMemory(int)

Returns a Memory<T> to write to that is at least the requested size (specified by sizeHint).

public Memory<T> GetMemory(int sizeHint = 0)

Parameters

sizeHint int

The minimum length of the returned Memory<T>. If 0, a non-empty buffer is returned.

Returns

Memory<T>

A Memory<T> of at least the size sizeHint. If sizeHint is 0, returns a non-empty buffer.

Exceptions

OutOfMemoryException

The requested buffer size is not available.