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

PipeBytesWriterGetMemory 方法

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

Definition

命名空间: TouchSocket.Core
程序集: TouchSocket.Core (在 TouchSocket.Core.dll 中) 版本:4.0.0-beta.143+5fcca7a4e70968794985dc3793adc50531308be6
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.

参见