Export (0) Print
Expand All

NetworkStream.FlushAsync Method (CancellationToken)

.NET Framework 4.6 and 4.5

Flushes data from the stream as an asynchronous operation.

Namespace:  System.Net.Sockets
Assembly:  System (in System.dll)

public override Task FlushAsync(
	CancellationToken cancellationToken


Type: System.Threading.CancellationToken

A cancellation token used to propagate notification that this operation should be canceled.

Return Value

Type: System.Threading.Tasks.Task
Returns Task.
The task object representing the asynchronous operation.

This operation will not block. The returned Task object will complete after data has been flushed from the stream for the NetworkStream instance.

.NET Framework

Supported in: 4.6, 4.5
© 2015 Microsoft