System.Net.WebSockets.ClientWebSocket.CloseOutputAsync Method

Close the output for the System.Net.WebSockets.ClientWebSocket instance as an asynchronous operation.

Syntax

[System.Diagnostics.DebuggerStepThrough]
[System.Runtime.CompilerServices.AsyncStateMachine(typeof(System.Net.WebSockets.ClientWebSocket/<CloseOutputAsync>c__async2))]
public override System.Threading.Tasks.Task CloseOutputAsync (WebSocketCloseStatus closeStatus, string statusDescription, System.Threading.CancellationToken cancellationToken)

Parameters

closeStatus
The WebSocket close status.
statusDescription
A description of the close status.
cancellationToken
A cancellation token used to propagate notification that this operation should be canceled.

Returns

Returns System.Threading.Tasks.Task.

The task object representing the asynchronous operation.

Remarks

This operation will not block. The returned System.Threading.Tasks.Task object will complete after the output on the System.Net.WebSockets.ClientWebSocket instance is closed.

Requirements

Namespace: System.Net.WebSockets
Assembly: System (in System.dll)
Assembly Versions: 4.0.0.0