WebSocketClient.CloseAsync Method
Namespace: Rebex.Net
Assembly: Rebex.WebSocket.dll (version 7.0.9119)
CloseAsync(WebSocketCloseStatus, String, CancellationToken)
Closes the sending part of the WebSocket (unless already closed) and waits for the receiving part to be closed.
Declaration
public async Task CloseAsync(WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
WebSocketCloseStatus | closeStatus | Close status to send to the server. |
String | statusDescription | Close status description to send to the server. |
CancellationToken | cancellationToken | Cancellation token to cancel the operation. |
Returns
Type | Description |
---|---|
Task |