bothy-sdk
    Preparing search index...

    Class CloseReason

    Why a gateway (or an adapter) stopped: the close code and its reason text.

    new CloseReason(4015, "consumer_replaced").permanent; // true
    
    Index

    Constructors

    Properties

    Accessors

    Constructors

    • Creates the reason.

      Parameters

      • code: number

        The close code.

      • reason: string = ""

        The reason text.

      Returns CloseReason

    Properties

    code: number

    The WebSocket close code (1000 for an own stop).

    reason: string

    The close reason the server sent, or an own reason.

    Accessors

    • get permanent(): boolean

      Whether the stop is final: the code is in STOP_ON (the brief's permanent).

      Returns boolean

    • get reconnects(): boolean

      Whether an agent reconnects after this code.

      Returns boolean