Interface IConnectOptions

ConnectOptions is used to configure the WebSocket connectivity behavior.

interface IConnectOptions {
    blockAsyncConnect?: boolean;
    retryInterval?: number;
    strategy?: string | ConnectStrategy;
    timeoutDuration?: number;
    url?: string;
}

Properties

blockAsyncConnect?: boolean

Indicates if the async fn connect() method should return immediately or wait for connection to occur or fail before returning. (default is true)

retryInterval?: number

A custom retry interval in milliseconds.

strategy?: string | ConnectStrategy

ConnectStrategy used to configure the retry or fallback behavior. In retry mode, the WebSocket will continuously attempt to connect to the server. (default is {link ConnectStrategy.Retry}).

timeoutDuration?: number

A custom connection timeout in milliseconds.

url?: string

A custom URL that will change the current URL of the WebSocket. If supplied, the URL will override the use of resolver.

Generated using TypeDoc