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

SerialPortClientBaseCloseAsync 方法

关闭客户端。

Definition

命名空间: TouchSocket.SerialPorts
程序集: TouchSocket.SerialPorts (在 TouchSocket.SerialPorts.dll 中) 版本:4.1.4.7+7f7e1f78093c99347956e09330d5d7aca1d2bdf2
C#
public virtual Task<Result> CloseAsync(
	string msg,
	CancellationToken cancellationToken = default
)

参数

msg  String
关闭时的提示信息。
cancellationToken  CancellationToken  (Optional)
可取消令箭。

返回值

TaskResult
表示异步操作结果的 TaskTResult

实现

IClosableClientCloseAsync(String, CancellationToken)

参见