Del via


WebSocketClient.ConnectAsync Method

Definition

Overloads

ConnectAsync()

Establish a connection with no custom headers.

ConnectAsync(IDictionary<String,String>)

Establish a connection with optional custom headers.

ConnectAsync()

Source:
WebSocketClient.cs

Establish a connection with no custom headers.

public System.Threading.Tasks.Task ConnectAsync ();
abstract member ConnectAsync : unit -> System.Threading.Tasks.Task
override this.ConnectAsync : unit -> System.Threading.Tasks.Task
Public Function ConnectAsync () As Task

Returns

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

Implements

Applies to

ConnectAsync(IDictionary<String,String>)

Source:
WebSocketClient.cs

Establish a connection with optional custom headers.

public System.Threading.Tasks.Task ConnectAsync (System.Collections.Generic.IDictionary<string,string> requestHeaders = default);
abstract member ConnectAsync : System.Collections.Generic.IDictionary<string, string> -> System.Threading.Tasks.Task
override this.ConnectAsync : System.Collections.Generic.IDictionary<string, string> -> System.Threading.Tasks.Task
Public Function ConnectAsync (Optional requestHeaders As IDictionary(Of String, String) = 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.

Returns

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

Implements

Applies to