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

SerialPortClientBaseProtectedSendAsync(ReadOnlyMemoryByte, CancellationToken) 方法

异步发送数据,通过适配器模式灵活处理数据发送。

Definition

命名空间: TouchSocket.SerialPorts
程序集: TouchSocket.SerialPorts (在 TouchSocket.SerialPorts.dll 中) 版本:4.1.4.7+7f7e1f78093c99347956e09330d5d7aca1d2bdf2
C#
protected Task ProtectedSendAsync(
	ReadOnlyMemory<byte> memory,
	CancellationToken cancellationToken
)

参数

memory  ReadOnlyMemoryByte
待发送的只读字节内存块。
cancellationToken  CancellationToken
可取消令箭

返回值

Task
一个异步任务,表示发送操作。

参见