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

ValueByteBlock(Int32, FuncInt32, MemoryByte, ActionMemoryByte) 构造函数

使用指定容量和内存管理委托初始化ValueByteBlock的新实例。

Definition

命名空间: TouchSocket.Core
程序集: TouchSocket.Core (在 TouchSocket.Core.dll 中) 版本:4.0.0-beta.143+5fcca7a4e70968794985dc3793adc50531308be6
C#
public ValueByteBlock(
	int capacity,
	Func<int, Memory<byte>> onRent,
	Action<Memory<byte>> onReturn
)

参数

capacity  Int32
初始容量,最小为1024字节。
onRent  FuncInt32, MemoryByte
内存租赁委托。
onReturn  ActionMemoryByte
内存归还委托。

参见