Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WampBindingOptions

Options provided by the WAMP communication binding.

Hierarchy

  • CommunicationBindingOptions
    • WampBindingOptions

Index

Properties

Optional authId

authId: string

The authentication ID for WAMP "cryptosign" authentication method (optional).

Not needed for default "anonymous" authentication method.

Optional autoPingInterval

autoPingInterval: number

Seconds between automatic pings (optional).

Defaults to 10 secs.

remarks

This option is only applicable on websocket transports where the underlying platform is Node.js / Electron.

Optional autoPingSize

autoPingSize: number

Number of bytes of random data to send in ping messages, must be between 4 and 125 (optional).

Defaults to 4.

remarks

This option is only applicable on websocket transports where the underlying platform is Node.js / Electron.

Optional autoPingTimeout

autoPingTimeout: number

Seconds until a ping is considered timed out (optional).

Defaults to 5 secs.

remarks

This option is only applicable on websocket transports where the underlying platform is Node.js / Electron.

Optional initialRetryDelay

initialRetryDelay: number

Initial delay for reconnection attempt in seconds (optional).

Defaults to 1.5.

Optional logLevel

logLevel: CommunicationBindingLogLevel

The level used to log errors, informational, as well as debug messages generated by the binding (optional).

Messages corresponding to the specified log level are emitted on the "error", "info", or "debug" event, respectively. If level is "error", only errors are emitted; if level is "info", only "error" and "info" messages are emitted; if level is "debug", all messages are emitted.

If not specified, the log level defaults to "error".

Optional maxRetries

maxRetries: number

Maximum number of reconnection attempts (optional).

Defaults to 15. Unlimited if set to -1.

Optional maxRetryDelay

maxRetryDelay: number

Maximum delay for reconnection attempts in seconds (optional).

Defaults to 300.

Optional namespace

namespace: string

Namespace used to isolate different Coaty applications running with the same binding type in the same networking infrastructure (optional).

Communication events are only routed between agents within a common communication namespace: an agent publishes and observes communication events with respect to the given namespace.

If not specified (i.e. undefined), a default namespace named "-" is used.

Optional onChallenge

onChallenge: (session: Session, method: string, extra: any) => string | Promise<string>

A challenge function called by binding when WAMP router sends a challenge (optional).

Type declaration

    • (session: Session, method: string, extra: any): string | Promise<string>
    • Parameters

      • session: Session
      • method: string
      • extra: any

      Returns string | Promise<string>

Optional realm

realm: string

The WAMP realm, a routing namespace and an administrative domain for WAMP (optional).

If not specified, the default realm is "coaty".

Specify your own realm, if you want to configure your WAMP router with custom realm roles and permissions different from the default realm.

Optional retryDelayGrowth

retryDelayGrowth: number

The growth factor applied to the retry delay between reconnection attempts (optional).

Defaults to 1.5.

Optional retryDelayJitter

retryDelayJitter: number

The standard deviation of a Gaussian to jitter the delay on each retry cycle as a fraction of the mean (optional).

Defaults to 0.1.

Optional retryIfUnreachable

retryIfUnreachable: boolean

Enables automatic reconnect if host is unreachable (optional).

Defaults to true.

routerUrl

routerUrl: string

Connection Url to WAMP router (schema protocol://host:port/path, e.g. ws://localhost:8080/ws).

Supported protocols include WebSocket transports ws and wss. The path can be configured on your WAMP router which allows serving different Web assets under different paths on the same host IP.

Optional shouldEnableCrossNamespacing

shouldEnableCrossNamespacing: boolean

Determines whether to enable cross-namespace communication between agents in special use cases (optional).

If true, an agent receives communication events published by any agent running with the same binding type in the same networking infrastructure, regardless of namespace.

If not specified or false, this option is not enabled.

Optional tlsOptions

tlsOptions: { ca: Buffer | string; cert: Buffer | string; key: Buffer | string }

TLS client authentication options (optional).

remarks

This option is only applicable on secure websocket transports (wss) where the underlying platform is Node.js / Electron.

Type declaration

  • ca: Buffer | string

    Trusted CA certificate.

  • cert: Buffer | string

    Certificate Public Key.

  • key: Buffer | string

    Certificate Private Key.

Generated using TypeDoc