Wolfringo Wolfringo
Wolfringo Wolfringo
Wolfringo (c) 2020 TehGM
DocFX, DiscordFX theme.
Search Results for

    Class ReconnectorConfig

    Represents configuration for WolfClientReconnector.

    Inheritance
    System.Object
    ReconnectorConfig
    Namespace: TehGM.Wolfringo.Utilities
    Assembly: Wolfringo.Utilities.dll
    Syntax
    public class ReconnectorConfig

    Constructors

    | Improve this Doc View Source

    ReconnectorConfig()

    Default configuration, attempting to reconnect at 500ms interval, max 5 times, and without cancellation and logging support.

    Declaration
    public ReconnectorConfig()
    | Improve this Doc View Source

    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 Source

    CancellationToken

    Cancellation token for cancelling reconnection.

    Declaration
    public CancellationToken CancellationToken { get; set; }
    Property Value
    Type Description
    System.Threading.CancellationToken
    | Improve this Doc View Source

    Log

    Logger to log messages to.

    Declaration
    public ILogger Log { get; set; }
    Property Value
    Type Description
    Microsoft.Extensions.Logging.ILogger
    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    ReconnectionDelay

    Delay between reconnection attempts.

    Declaration
    public TimeSpan ReconnectionDelay { get; set; }
    Property Value
    Type Description
    System.TimeSpan