OptionalbackoffOptionalfactor?: numberFactor by which the delay increases after each attempt.
OptionalinitialDelay?: numberInitial delay in milliseconds before first reconnect attempt.
OptionalmaxDelay?: numberMaximum delay in milliseconds between reconnect attempts.
OptionalrandomisationFactor?: numberRandomisation factor to add jitter to reconnect delays.
OptionalcallThe number of concurrent in-flight outbound calls permitted at any one time. Additional calls are queued. There is no concurrency limit imposed on inbound calls. OCPP requires this to be set to 1, but you may choose other values for non-OCPP/custom protocols.
OptionalcallMilliseconds to wait before unanswered outbound calls are rejected automatically.
OptionaldeferShould the client skip sending keep-alive pings if other data is being regularly received? Enabling this option can help reduce data usage (especially on TLS-secured connections), but may cause compatibility issues with some real-world servers as they might treat an absence of pings to mean the connection to the client is lost.
The RPC server's endpoint (a websocket URL). Required.
OptionalheadersAdditional HTTP headers to send along with the websocket upgrade request. Must be specified in object form (e.g. {'X-Custom-Header': 'CustomValue'})
The RPC client's identity. Will be automatically percent-encoded when used in the connection URL. Required.
OptionalmaxThe maximum number of non-conforming RPC messages which can be tolerated before the client is automatically closed.
OptionalmaxIf reconnect is true, specifies the number of times to try reconnecting before failing and emitting a 'close' event.
OptionalpasswordOptional password to use in HTTP Basic auth. This can be a Buffer to allow for binary passwords. If provided as a string, it will be encoded as UTF-8.
OptionalpingMilliseconds between WebSocket pings. Used for keep-alive timeouts.
OptionalprotocolsArray of subprotocols supported by this client.
OptionalqueryAn optional query string or object to append as the query string of the connection URL.
OptionalreconnectIf true, the client will attempt to reconnect after losing connection to the RPCServer. Only applies after making one initial successful connection.
OptionalrespondSpecifies whether to send detailed errors (including stack trace) to remote party upon an error being thrown by a handler. This may be undesirable in a production environment as it leaks the call stack of the handler.
OptionalstrictEnable strict validation of calls & responses. Pass an array of subprotocol names to limit strict mode to specific protocols.
OptionalstrictOptional additional validators to be used in conjunction with strictMode.
OptionalwsAdditional WebSocket options.
If reconnect is true, specifies the options for an ExponentialStrategy backoff strategy.