Del via


WebSocketClient.ConnectAsyncEx Method

Definition

Establish a connection with optional custom headers.

public System.Threading.Tasks.Task ConnectAsyncEx (System.Collections.Generic.IDictionary<string,string> requestHeaders = default, System.Threading.CancellationToken cancellationToken = default);
member this.ConnectAsyncEx : System.Collections.Generic.IDictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function ConnectAsyncEx (Optional requestHeaders As IDictionary(Of String, String) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

requestHeaders
IDictionary<String,String>

An optional IDictionary<TKey,TValue> of string header names and string header values to include when sending the initial request to establish this connection.

cancellationToken
CancellationToken

An optional CancellationToken used to signal this operation should be cancelled.

Returns

A Task that will not resolve until the client stops listening for incoming messages.

Applies to