Compartilhar via


HubConnectionBuilderExtensions.WithAutomaticReconnect Método

Definição

Sobrecargas

WithAutomaticReconnect(IHubConnectionBuilder)

Configura o HubConnection para tentar reconectar automaticamente se a conexão for perdida. O cliente aguardará os 0, 2, 10 e 30 segundos padrão, respectivamente, antes de tentar até quatro tentativas de reconexão.

WithAutomaticReconnect(IHubConnectionBuilder, IRetryPolicy)

Configura o HubConnection para tentar reconectar automaticamente se a conexão for perdida.

WithAutomaticReconnect(IHubConnectionBuilder, TimeSpan[])

Configura o HubConnection para tentar reconectar automaticamente se a conexão for perdida.

WithAutomaticReconnect(IHubConnectionBuilder)

Origem:
HubConnectionBuilderExtensions.cs
Origem:
HubConnectionBuilderExtensions.cs
Origem:
HubConnectionBuilderExtensions.cs
Origem:
HubConnectionBuilderExtensions.cs
Origem:
HubConnectionBuilderExtensions.cs
Origem:
HubConnectionBuilderExtensions.cs
Origem:
HubConnectionBuilderExtensions.cs

Configura o HubConnection para tentar reconectar automaticamente se a conexão for perdida. O cliente aguardará os 0, 2, 10 e 30 segundos padrão, respectivamente, antes de tentar até quatro tentativas de reconexão.

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

Parâmetros

hubConnectionBuilder
IHubConnectionBuilder

O IHubConnectionBuilder a ser configurado.

Retornos

A mesma instância do IHubConnectionBuilder para encadeamento.

Aplica-se a

WithAutomaticReconnect(IHubConnectionBuilder, IRetryPolicy)

Origem:
HubConnectionBuilderExtensions.cs
Origem:
HubConnectionBuilderExtensions.cs
Origem:
HubConnectionBuilderExtensions.cs
Origem:
HubConnectionBuilderExtensions.cs
Origem:
HubConnectionBuilderExtensions.cs
Origem:
HubConnectionBuilderExtensions.cs
Origem:
HubConnectionBuilderExtensions.cs

Configura o HubConnection para tentar reconectar automaticamente se a conexão for perdida.

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

Parâmetros

hubConnectionBuilder
IHubConnectionBuilder

O IHubConnectionBuilder a ser configurado.

retryPolicy
IRetryPolicy

Um IRetryPolicy que controla o tempo e o número de tentativas de reconexão.

Retornos

A mesma instância do IHubConnectionBuilder para encadeamento.

Aplica-se a

WithAutomaticReconnect(IHubConnectionBuilder, TimeSpan[])

Origem:
HubConnectionBuilderExtensions.cs
Origem:
HubConnectionBuilderExtensions.cs
Origem:
HubConnectionBuilderExtensions.cs
Origem:
HubConnectionBuilderExtensions.cs
Origem:
HubConnectionBuilderExtensions.cs
Origem:
HubConnectionBuilderExtensions.cs
Origem:
HubConnectionBuilderExtensions.cs

Configura o HubConnection para tentar reconectar automaticamente se a conexão for perdida.

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

Parâmetros

hubConnectionBuilder
IHubConnectionBuilder

O IHubConnectionBuilder a ser configurado.

reconnectDelays
TimeSpan[]

Uma matriz que contém os atrasos antes de tentar cada tentativa de reconexão. O comprimento da matriz representa quantas tentativas de reconexão com falha são necessárias antes que o cliente pare de tentar se reconectar.

Retornos

A mesma instância do IHubConnectionBuilder para encadeamento.

Aplica-se a