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

TransportStreamFlushAsync(CancellationToken) 方法

Asynchronously clears all buffers for this stream, causes any buffered data to be written to the underlying device, and monitors cancellation requests.

Definition

命名空间: TouchSocket.Sockets
程序集: TouchSocket (在 TouchSocket.dll 中) 版本:4.0.0-beta.143+5fcca7a4e70968794985dc3793adc50531308be6
C#
public override Task FlushAsync(
	CancellationToken cancellationToken
)

参数

cancellationToken  CancellationToken
The token to monitor for cancellation requests. The default value is None.

返回值

Task
A task that represents the asynchronous flush operation.

异常

ObjectDisposedExceptionThe stream has been disposed.

参见