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

SerialPortClientBaseProtectedSendAsync(ReadOnlyMemoryByte, CancellationToken) 方法

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

Definition

命名空间: TouchSocket.SerialPorts
程序集: TouchSocket.SerialPorts (在 TouchSocket.SerialPorts.dll 中) 版本:4.0.0-beta.143+5fcca7a4e70968794985dc3793adc50531308be6
C#
protected Task ProtectedSendAsync(
	ReadOnlyMemory<byte> memory,
	CancellationToken cancellationToken
)

参数

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

返回值

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

参见