Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SBClientOptions

These are the options that the Switchboard accepts as configuration.

Hierarchy

  • SBClientOptions

Index

Properties

Optional clientBlacklistDuration

clientBlacklistDuration: undefined | number

If set, this is the duration (in milliseconds) that a client will be prevented from reconnecting to this session, once they exceed the max retry limit. Pass 0 for no blacklist. Also accepts Infinity.

Optional clientMaxRetries

clientMaxRetries: undefined | number

The maximum attempts a client gets to successfully authenticate, before becoming blacklisted.

Optional clientTimeout

clientTimeout: undefined | number

The time (in milliseconds) before a client is disconnected automatically.

Optional seed

seed: undefined | string

If provided, the given ID will be used to reconnect as a past identity. Otherwise, a new one will be created.

Optional skipExtraTrackers

skipExtraTrackers: undefined | false | true

If provided (and true), Switchboard will NOT automatically check the excellent tracker list provided over at https://github.com/ngosang/trackerslist for additional trackers.

Optional trackers

trackers: (string | TrackerOptions)[]

A list of strings and/or TrackerOptions config objects. If provided, this list will replace all the default trackers SwitchBoard otherwise uses or looks up.

Optional useLongIds

useLongIds: undefined | false | true

For additional security, long-form IDs can be enabled. These IDs are longer and potentially more difficult to share. All clients wishing to connect together must use the same value for this setting.

Defaults to false, using shorter IDs.

Generated using TypeDoc