IClientWebSocket.ConnectAsync(Uri, CancellationToken) Method

Definition

Connect to a WebSocket server as an asynchronous operation.

public System.Threading.Tasks.Task ConnectAsync (Uri uri, System.Threading.CancellationToken cancellationToken);
abstract member ConnectAsync : Uri * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function ConnectAsync (uri As Uri, cancellationToken As CancellationToken) As Task

Parameters

uri
Uri

The URI of the WebSocket server to connect to.

cancellationToken
CancellationToken

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

Returns

Applies to