System.Net.WebSockets.WebSocket.CloseOutputAsync Method

Initiates or completes the close handshake defined in the tp://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-06.

Syntax

public abstract System.Threading.Tasks.Task CloseOutputAsync (WebSocketCloseStatus closeStatus, string statusDescription, System.Threading.CancellationToken cancellationToken)

Parameters

closeStatus
Indicates the reason for closing the WebSocket connection.
statusDescription
Allows applications to specify a human readable explanation as to why the connection is closed.
cancellationToken
The token that can be used to propagate notification that operations 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 WebSocket has been closed.

Requirements

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