Method CloseAsync
CloseAsync(CancellationToken)
Closes the WebSocket connection asynchronously.
public Task<HttpResponse> CloseAsync(CancellationToken cancellation = default)
Parameters
cancellation
CancellationTokenThe CancellationToken to use for cancellation.
Returns
- Task<HttpResponse>
A Task<TResult> that represents the asynchronous close operation, which returns an HttpResponse indicating the result of the close operation.