Interface ConnectionMonitorInit

interface ConnectionMonitorInit {
    abortConnectionOnPingFailure?: boolean;
    enabled?: boolean;
    pingInterval?: number;
    pingTimeout?: Omit<AdaptiveTimeoutInit, "metrics" | "metricsName">;
    protocolPrefix?: string;
}

Properties

abortConnectionOnPingFailure?: boolean

If true, any connection that fails the ping will be aborted

Default

true
enabled?: boolean

Whether the connection monitor is enabled

Default

true
pingInterval?: number

How often to ping remote peers in ms

Default

10000
pingTimeout?: Omit<AdaptiveTimeoutInit, "metrics" | "metricsName">

Timeout settings for how long the ping is allowed to take before the connection will be judged inactive and aborted.

The timeout is adaptive to cope with slower networks or nodes that have changing network characteristics, such as mobile.

protocolPrefix?: string

Override the ping protocol prefix

Default

'ipfs'