Class ReconnectorConfig
Represents configuration for WolfClientReconnector.
Inheritance
System.Object
    ReconnectorConfig
  Namespace: TehGM.Wolfringo.Utilities
Assembly: Wolfringo.Utilities.dll
Syntax
public class ReconnectorConfigConstructors
| Improve this Doc View SourceReconnectorConfig()
Default configuration, attempting to reconnect at 500ms interval, max 5 times, and without cancellation and logging support.
Declaration
public ReconnectorConfig()ReconnectorConfig(Int32, TimeSpan, ILogger, CancellationToken)
Creates a new reconnector configuration.
Declaration
public ReconnectorConfig(int attempts, TimeSpan delay, ILogger logger = null, CancellationToken cancellationToken = default(CancellationToken))Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | attempts | Max reconnection attempts. 0 will disable reconnection; negative number means infinite. | 
| System.TimeSpan | delay | Delay between reconnection attempts. | 
| Microsoft.Extensions.Logging.ILogger | logger | Logger to log messages to. | 
| System.Threading.CancellationToken | cancellationToken | Cancellation token for cancelling reconnection. | 
Properties
| Improve this Doc View SourceCancellationToken
Cancellation token for cancelling reconnection.
Declaration
public CancellationToken CancellationToken { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Threading.CancellationToken | 
Log
Logger to log messages to.
Declaration
public ILogger Log { get; set; }Property Value
| Type | Description | 
|---|---|
| Microsoft.Extensions.Logging.ILogger | 
ReconnectAttempts
Max reconnection attempts.
Declaration
public int ReconnectAttempts { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Int32 | 
Remarks
Value of 0 means reconnection will not be attempted. Negative values will be treated as infinite.
Defaults to 5 times.
ReconnectionDelay
Delay between reconnection attempts.
Declaration
public TimeSpan ReconnectionDelay { get; set; }Property Value
| Type | Description | 
|---|---|
| System.TimeSpan | 
