Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NetworkClient

Class that represents network client

Hierarchy

  • NetworkClient

Index

Methods

disconnect

  • disconnect(reason: string): void
  • disconnect(): void
  • Disconnects player from the server and sends a packet with given reason

    Parameters

    • reason: string

    Returns void

  • Disconnects player from the server with no further information

    Returns void

getDisconnectCause

  • getDisconnectCause(): IOException

getDisconnectPacket

  • getDisconnectPacket(): string

getPlayerUid

  • getPlayerUid(): number

send

  • send(name: string, packetData: object): void
  • Sends given packet to the following client

    Parameters

    • name: string

      name of the packet to send

    • packetData: object

      packet data object

    Returns void

sendMessage

  • sendMessage(message: string): void
  • Sends a packet to the client with a text like a system message

    Parameters

    • message: string

    Returns void

Generated using TypeDoc