Class Peer<T>

Type Parameters

Constructors

Properties

Accessors

Methods

Constructors

Properties

data: T

Accessors

Methods

  • Disconnects the peer.

    Parameters

    • type: "now" | "later" | "normal" = "later"

      Type of disconnection. Defaults to later.

    Returns void

  • Sends multiple packets to a single peer.

    Parameters

    • Rest...data: Sendable[]

      An argument of packets that contains the parse() function or just an array of Buffers.

    Returns void

  • Sends multiple packets to a single peer.

    Parameters

    • _client: Host

      The Wrapper client.

    • netID: number

      The netID of a peer.

    • channelID: number

      The channelID of a channels.

    • Rest...data: Sendable[]

      An argument of packets that contains the parse() function or just an array of Buffers.

    Returns boolean