WebSocketClient.ConnectAsyncEx Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.