一款简单易用的基础网络通讯组件库。

ValueByteBlockGetMemory 方法

Returns a MemoryT to write to that is at least the requested size (specified by sizeHint).

Definition

命名空间: TouchSocket.Core
程序集: TouchSocket.Core (在 TouchSocket.Core.dll 中) 版本:3.0.0+ccaf96084d09f972257496d1dd63b8ba3c1e44f0
C#
public Memory<byte> GetMemory(
	int sizeHint = 0
)

参数

sizeHint  Int32  (Optional)
The minimum length of the returned MemoryT. If 0, a non-empty buffer is returned.

返回值

MemoryByte
A MemoryT of at least the size sizeHint. If sizeHint is 0, returns a non-empty buffer.

实现

IBufferWriterTGetMemory(Int32)

异常

OutOfMemoryExceptionThe requested buffer size is not available.

参见