Compartir a través de


HubConnectionBuilderExtensions.WithAutomaticReconnect Método

Definición

Sobrecargas

WithAutomaticReconnect(IHubConnectionBuilder)

Configura el HubConnection para intentar volver a conectarse automáticamente si se pierde la conexión. El cliente esperará el valor predeterminado 0, 2, 10 y 30 segundos respectivamente antes de intentar hasta cuatro intentos de reconexión.

WithAutomaticReconnect(IHubConnectionBuilder, IRetryPolicy)

Configura el HubConnection para intentar volver a conectarse automáticamente si se pierde la conexión.

WithAutomaticReconnect(IHubConnectionBuilder, TimeSpan[])

Configura el HubConnection para intentar volver a conectarse automáticamente si se pierde la conexión.

WithAutomaticReconnect(IHubConnectionBuilder)

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

Configura el HubConnection para intentar volver a conectarse automáticamente si se pierde la conexión. El cliente esperará el valor predeterminado 0, 2, 10 y 30 segundos respectivamente antes de intentar hasta cuatro intentos de reconexión.

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

El IHubConnectionBuilder que se va a configurar.

Devoluciones

La misma instancia del IHubConnectionBuilder para encadenar.

Se aplica a

WithAutomaticReconnect(IHubConnectionBuilder, IRetryPolicy)

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

Configura el HubConnection para intentar volver a conectarse automáticamente si se pierde la conexión.

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

El IHubConnectionBuilder que se va a configurar.

retryPolicy
IRetryPolicy

Un IRetryPolicy que controla el tiempo y el número de intentos de reconexión.

Devoluciones

La misma instancia del IHubConnectionBuilder para encadenar.

Se aplica a

WithAutomaticReconnect(IHubConnectionBuilder, TimeSpan[])

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

Configura el HubConnection para intentar volver a conectarse automáticamente si se pierde la conexión.

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

El IHubConnectionBuilder que se va a configurar.

reconnectDelays
TimeSpan[]

Matriz que contiene los retrasos antes de intentar cada intento de reconexión. La longitud de la matriz representa cuántos intentos de reconexión con error tarda antes de que el cliente deje de intentar volver a conectarse.

Devoluciones

La misma instancia del IHubConnectionBuilder para encadenar.

Se aplica a