Partager via


HubConnectionBuilderExtensions.WithAutomaticReconnect Méthode

Définition

Surcharges

WithAutomaticReconnect(IHubConnectionBuilder)

Configure le HubConnection pour tenter automatiquement de se reconnecter si la connexion est perdue. Le client attend les 0, 2, 10 et 30 secondes par défaut, respectivement, avant d’essayer jusqu’à quatre tentatives de reconnexion.

WithAutomaticReconnect(IHubConnectionBuilder, IRetryPolicy)

Configure le HubConnection pour tenter automatiquement de se reconnecter si la connexion est perdue.

WithAutomaticReconnect(IHubConnectionBuilder, TimeSpan[])

Configure le HubConnection pour tenter automatiquement de se reconnecter si la connexion est perdue.

WithAutomaticReconnect(IHubConnectionBuilder)

Source:
HubConnectionBuilderExtensions.cs
Source:
HubConnectionBuilderExtensions.cs
Source:
HubConnectionBuilderExtensions.cs
Source:
HubConnectionBuilderExtensions.cs
Source:
HubConnectionBuilderExtensions.cs
Source:
HubConnectionBuilderExtensions.cs
Source:
HubConnectionBuilderExtensions.cs

Configure le HubConnection pour tenter automatiquement de se reconnecter si la connexion est perdue. Le client attend les 0, 2, 10 et 30 secondes par défaut, respectivement, avant d’essayer jusqu’à quatre tentatives de reconnexion.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::SignalR::Client::IHubConnectionBuilder ^ WithAutomaticReconnect(Microsoft::AspNetCore::SignalR::Client::IHubConnectionBuilder ^ hubConnectionBuilder);
public static Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder WithAutomaticReconnect (this Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder hubConnectionBuilder);
static member WithAutomaticReconnect : Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder -> Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder
<Extension()>
Public Function WithAutomaticReconnect (hubConnectionBuilder As IHubConnectionBuilder) As IHubConnectionBuilder

Paramètres

hubConnectionBuilder
IHubConnectionBuilder

IHubConnectionBuilder à configurer.

Retours

La même instance du IHubConnectionBuilder pour le chaînage.

S’applique à

WithAutomaticReconnect(IHubConnectionBuilder, IRetryPolicy)

Source:
HubConnectionBuilderExtensions.cs
Source:
HubConnectionBuilderExtensions.cs
Source:
HubConnectionBuilderExtensions.cs
Source:
HubConnectionBuilderExtensions.cs
Source:
HubConnectionBuilderExtensions.cs
Source:
HubConnectionBuilderExtensions.cs
Source:
HubConnectionBuilderExtensions.cs

Configure le HubConnection pour tenter automatiquement de se reconnecter si la connexion est perdue.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::SignalR::Client::IHubConnectionBuilder ^ WithAutomaticReconnect(Microsoft::AspNetCore::SignalR::Client::IHubConnectionBuilder ^ hubConnectionBuilder, Microsoft::AspNetCore::SignalR::Client::IRetryPolicy ^ retryPolicy);
public static Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder WithAutomaticReconnect (this Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder hubConnectionBuilder, Microsoft.AspNetCore.SignalR.Client.IRetryPolicy retryPolicy);
static member WithAutomaticReconnect : Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder * Microsoft.AspNetCore.SignalR.Client.IRetryPolicy -> Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder
<Extension()>
Public Function WithAutomaticReconnect (hubConnectionBuilder As IHubConnectionBuilder, retryPolicy As IRetryPolicy) As IHubConnectionBuilder

Paramètres

hubConnectionBuilder
IHubConnectionBuilder

IHubConnectionBuilder à configurer.

retryPolicy
IRetryPolicy

IRetryPolicy qui contrôle le minutage et le nombre de tentatives de reconnexion.

Retours

La même instance du IHubConnectionBuilder pour le chaînage.

S’applique à

WithAutomaticReconnect(IHubConnectionBuilder, TimeSpan[])

Source:
HubConnectionBuilderExtensions.cs
Source:
HubConnectionBuilderExtensions.cs
Source:
HubConnectionBuilderExtensions.cs
Source:
HubConnectionBuilderExtensions.cs
Source:
HubConnectionBuilderExtensions.cs
Source:
HubConnectionBuilderExtensions.cs
Source:
HubConnectionBuilderExtensions.cs

Configure le HubConnection pour tenter automatiquement de se reconnecter si la connexion est perdue.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::SignalR::Client::IHubConnectionBuilder ^ WithAutomaticReconnect(Microsoft::AspNetCore::SignalR::Client::IHubConnectionBuilder ^ hubConnectionBuilder, cli::array <TimeSpan> ^ reconnectDelays);
public static Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder WithAutomaticReconnect (this Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder hubConnectionBuilder, TimeSpan[] reconnectDelays);
static member WithAutomaticReconnect : Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder * TimeSpan[] -> Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder
<Extension()>
Public Function WithAutomaticReconnect (hubConnectionBuilder As IHubConnectionBuilder, reconnectDelays As TimeSpan()) As IHubConnectionBuilder

Paramètres

hubConnectionBuilder
IHubConnectionBuilder

IHubConnectionBuilder à configurer.

reconnectDelays
TimeSpan[]

Tableau contenant les retards avant chaque tentative de reconnexion. La longueur du tableau représente le nombre de tentatives de reconnexion ayant échoué avant que le client cesse de tenter de se reconnecter.

Retours

La même instance du IHubConnectionBuilder pour le chaînage.

S’applique à