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

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

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

Definition

命名空间: TouchSocket.Core
程序集: TouchSocket.Core (在 TouchSocket.Core.dll 中) 版本:4.1.4.7+7f7e1f78093c99347956e09330d5d7aca1d2bdf2
C#
public ByteBlock(
	int capacity,
	Func<int, Memory<byte>> onRent,
	Action<Memory<byte>> onReturn
)

参数

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

参见