screeps-api
    Preparing search index...

    Interface ScreepsSocketConfig

    Configuration options for ScreepsSocketClient. These are used when calling ScreepsSocketClient.connect.

    DEFAULT_SOCKET_CONFIG for default values

    interface ScreepsSocketConfig {
        keepAlive: boolean;
        keepAliveInterval: number;
        maxRetries: number;
        maxRetryDelay: number;
        reconnect: boolean;
        resubscribe: boolean;
    }
    Index

    Properties

    keepAlive: boolean

    If enabled, ping the server periodically to prevent the connection from being closed.

    keepAliveInterval: number

    Time (in milliseconds) between keep-alive pings

    maxRetries: number

    The maximum number of connection attempts to make before throwing an error in ScreepsSocketClient.reconnect.

    maxRetryDelay: number

    The maximum delay (in milliseconds) before a retry attempt in ScreepsSocketClient.reconnect.

    reconnect: boolean

    If enabled, ScreepsSocketClient will call reconnect automatically when disconnected.

    resubscribe: boolean

    If enabled, all previous subscriptions will be recreated after successfully reconnecting.