node-insim
    Preparing search index...

    Class InSim

    Hierarchy

    Index

    Constructors

    • Parameters

      • Optionalid: string

      Returns InSim

    Properties

    id: string

    A unique identifier of the InSim connection to a specific host

    defaultMaxListeners: number
    INSIM_VERSION: number = 9

    Currently supported InSim version

    Accessors

    Methods

    • Connect to a server via InSim.

      Parameters

      • options: Omit<Partial<Partial<PacketDataWithReqI<IS_ISI>>>, "InSimVer"> & InSimConnectionOptions

      Returns void

    • Connect to InSim Relay.

      After you are connected you can request a host list, so you can see which hosts you can connect to. Then you can send a packet to the Relay to select a host. After that the Relay will send you all insim data from that host.

      Some hosts require a spectator password in order to be selectable.

      You do not need to specify a spectator password if you use a valid administrator password.

      If you connect with an administrator password, you can send just about every regular InSim packet there is available in LFS, just like as if you were connected to the host directly.

      Regular insim packets that a relay client can send to host:

      For anyone TINY_VER TINY_PING TINY_SCP TINY_SST TINY_GTH TINY_ISM TINY_NCN TINY_NPL TINY_RES TINY_REO TINY_RST TINY_AXI

      Admin only TINY_VTC ISP_MST ISP_MSX ISP_MSL ISP_MTC ISP_SCH ISP_BFN ISP_BTN

      The relay will also accept, but not forward TINY_NONE // for relay-connection maintenance

      Returns void

    • Returns number

    • Send a message which will appear on the local computer only.

      The maximum length of the message is MSL_MSG_MAX_LENGTH characters.

      Parameters

      • message: string
      • sound: MessageSound = MessageSound.SND_SILENT

      Returns void

    • Send a message or command to LFS

      If the message starts with a slash (/), it will be treated as a command. Otherwise, it will be treated as a message.

      The maximum length of the message is MSX_MSG_MAX_LENGTH characters.

      Parameters

      • message: string

      Returns void

    • Send a message to a specific connection

      Parameters

      • ucid: number
      • message: string
      • sound: MessageSound = MessageSound.SND_SILENT

      Returns void

    • Send a message to a specific player

      Parameters

      • plid: number
      • message: string
      • sound: MessageSound = MessageSound.SND_SILENT

      Returns void

    • Parameters

      • n: number

      Returns this