HubConnectionBuilder Class

Definition

A builder for configuring HubConnection instances.

public ref class HubConnectionBuilder : Microsoft::AspNetCore::SignalR::Client::IHubConnectionBuilder, Microsoft::AspNetCore::SignalR::ISignalRBuilder
public class HubConnectionBuilder : Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder, Microsoft.AspNetCore.SignalR.ISignalRBuilder
type HubConnectionBuilder = class
    interface IHubConnectionBuilder
    interface ISignalRBuilder
Public Class HubConnectionBuilder
Implements IHubConnectionBuilder, ISignalRBuilder
Inheritance
HubConnectionBuilder
Implements

Constructors

HubConnectionBuilder()

Initializes a new instance of the HubConnectionBuilder class.

Properties

Services

Methods

Build()
Equals(Object)
GetHashCode()
GetType()
ToString()

Extension Methods

ConfigureLogging(IHubConnectionBuilder, Action<ILoggingBuilder>)

Adds a delegate for configuring the provided ILoggingBuilder. This may be called multiple times.

WithAutomaticReconnect(IHubConnectionBuilder)

Configures the HubConnection to automatically attempt to reconnect if the connection is lost. The client will wait the default 0, 2, 10 and 30 seconds respectively before trying up to four reconnect attempts.

WithAutomaticReconnect(IHubConnectionBuilder, IRetryPolicy)

Configures the HubConnection to automatically attempt to reconnect if the connection is lost.

WithAutomaticReconnect(IHubConnectionBuilder, TimeSpan[])

Configures the HubConnection to automatically attempt to reconnect if the connection is lost.

WithUrl(IHubConnectionBuilder, String)

Configures the HubConnection to use HTTP-based transports to connect to the specified URL.

WithUrl(IHubConnectionBuilder, String, HttpTransportType)

Configures the HubConnection to use HTTP-based transports to connect to the specified URL and transports.

WithUrl(IHubConnectionBuilder, String, HttpTransportType, Action<HttpConnectionOptions>)

Configures the HubConnection to use HTTP-based transports to connect to the specified URL and transports.

WithUrl(IHubConnectionBuilder, String, Action<HttpConnectionOptions>)

Configures the HubConnection to use HTTP-based transports to connect to the specified URL.

WithUrl(IHubConnectionBuilder, Uri)

Configures the HubConnection to use HTTP-based transports to connect to the specified URL.

WithUrl(IHubConnectionBuilder, Uri, HttpTransportType)

Configures the HubConnection to use HTTP-based transports to connect to the specified URL and transports.

WithUrl(IHubConnectionBuilder, Uri, HttpTransportType, Action<HttpConnectionOptions>)

Configures the HubConnection to use HTTP-based transports to connect to the specified URL and transports.

WithUrl(IHubConnectionBuilder, Uri, Action<HttpConnectionOptions>)

Configures the HubConnection to use HTTP-based transports to connect to the specified URL.

WithMessagePackProtocol(IHubConnectionBuilder)
WithMessagePackProtocol(IHubConnectionBuilder, MessagePackHubProtocolOptions)
AddMessagePackProtocol(ISignalRBuilder)

Enables the MsgPack protocol for SignalR.

AddMessagePackProtocol(ISignalRBuilder, Action<MessagePackHubProtocolOptions>)

Enables the MsgPack protocol for SignalR and allows options for the MsgPack protocol to be configured.

Applies to