Triangle.js Docs
    Preparing search index...

    Class IGEHandler

    Manages network IGE cancelling

    Index

    Constructors

    • Manages network IGE cancelling

      Parameters

      • players: number[]

        list of player ids

      Returns IGEHandler

    Methods

    • Receives a garbage from a player and processes it. Adds the player to the players list if it does not exist.

      Parameters

      • garbage: { ackiid: number; amount: number; iid: number; playerID: number }

        garbage object of data

        • ackiid: number

          The IID of the last acknowledged item.

        • amount: number

          The amount of the incoming item.

        • iid: number

          The IID of the incoming item.

        • playerID: number

          The ID of the player sending the garbage.

      Returns number

      The remaining amount after processing the message.

    • Sends a message to a player. Adds the player to the players list if it does not exist.

      Parameters

      • options: { amount: number; playerID: number }

        info on sending player

        • amount: number

          The amount of the message.

        • playerID: number

          The ID of the player to send the message to.

      Returns void