SerenityJS
    Preparing search index...

    Hierarchy

    Index

    Constructors

    Properties

    connections: Map<Connection, ConnectionProperties> = ...

    The current connections that are being handled by the network

    handlers: Set<NetworkHandler> = ...

    The registered handlers that are being used to handle incoming packets

    logger: Logger = ...

    The logger that is being used to log network events

    properties: NetworkProperties

    The properties that are being used for the network

    raknet: Server

    The raknet instance that is being used to handle incoming packets

    serenity: Serenity

    The serenity instance that is being used to handle incoming packets

    Accessors

    • get compressionMethod(): CompressionMethod

      The current compression method that is being used for the network

      Returns CompressionMethod

    • set compressionMethod(method: CompressionMethod): void

      The current compression method that is being used for the network

      Parameters

      • method: CompressionMethod

      Returns void

    • get maxListeners(): number

      Returns number

    • set maxListeners(value: number): void

      Parameters

      • value: number

      Returns void

    Methods

    • Type Parameters

      Parameters

      Returns this

    • Type Parameters

      Parameters

      Returns this

    • Deflates a buffer using the zlib compression algorithm

      Parameters

      • buffer: Buffer

        The buffer to deflate

      Returns Buffer

      The deflated buffer

    • Parameters

      • connection: Connection
      • message: string
      • reason: DisconnectReason

      Returns void

    • Type Parameters

      Parameters

      Returns boolean

    • Inflates a zlib compressed buffer

      Parameters

      • buffer: Buffer

        The zlib compressed buffer to inflate

      Returns Buffer

      The inflated buffer

    • Type Parameters

      Parameters

      Returns this

    • Type Parameters

      Parameters

      Returns this

    • Type Parameters

      Parameters

      Returns this

    • Type Parameters

      Parameters

      Returns this

    • Handles all incoming connections from the raknet server

      Parameters

      • connection: Connection

        The connection that is being established

      Returns void

    • Handles all disconnections from the raknet server

      Parameters

      • connection: Connection

        The connection that is being disconnected

      Returns void

    • Handles all incoming packet traffic from the raknet server

      Parameters

      • connection: Connection

        The raknet connection the data is coming from

      • ...data: Buffer[]

        The data buffers that are being sent from the connection

      Returns void

    • Type Parameters

      Parameters

      Returns this

    • Type Parameters

      Parameters

      Returns this

    • Type Parameters

      Parameters

      • Optionalevent: K

      Returns this

    • Type Parameters

      Parameters

      • Optionalevent: K

      Returns this

    • Type Parameters

      Parameters

      • Optionalevent: K

      Returns this

    • Type Parameters

      Parameters

      Returns this

    • Parameters

      • path: string

      Returns this

    • Send a batch of packets to a connection with a specified priority

      Parameters

      • connection: Connection

        The connection to send the packets to

      • priority: Priority = Priority.Normal

        The priority of the packets being sent

      • ...packets: DataPacket[]

        The packets to send to the connection

      Returns void

    • Sends a batch of packets to a connection with immediate priority

      Parameters

      • connection: Connection

        The connection to send the packets to immediately

      • ...packets: DataPacket[]

        The packets to send to the connection

      Returns void

    • Sends a batch of packets to a connection with normal priority

      Parameters

      • connection: Connection

        The connection to send the packets to with normal priority

      • ...packets: DataPacket[]

        The packets to send to the connection

      Returns void