IConnectionFactory.ConnectAsync(TransferFormat, CancellationToken) 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.
Creates a new connection to a SignalR server using the specified TransferFormat.
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Connections.ConnectionContext> ConnectAsync (Microsoft.AspNetCore.Connections.TransferFormat transferFormat, System.Threading.CancellationToken cancellationToken = default);
abstract member ConnectAsync : Microsoft.AspNetCore.Connections.TransferFormat * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Connections.ConnectionContext>
Public Function ConnectAsync (transferFormat As TransferFormat, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ConnectionContext)
Parameters
- transferFormat
- TransferFormat
The transfer format the connection should use.
- cancellationToken
- CancellationToken
The token to monitor for cancellation requests. The default value is None.
Returns
A Task<TResult> that represents the asynchronous connect. The Result property returns a ConnectionContext for the new connection.