Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NodeMessage

Hierarchy

  • NodeMessage

Index

Constructors

  • new NodeMessage(client: SocketHandler, id: number, receptive: boolean, data: any): NodeMessage
  • since

    0.0.1

    Parameters

    • client: SocketHandler

      The socket that received this message.

    • id: number

      The ID of the message.

    • receptive: boolean

      Whether or not this message accepts a reply.

    • data: any

      The data received from the socket.

    Returns NodeMessage

Properties

client: SocketHandler

The client that received this message.

since

0.0.1

data: any

The data received from the socket.

since

0.0.1

id: number

The id of this message.

since

0.0.1

receptive: boolean

Whether the message is receptive or not.

since

0.0.1

Methods

  • reply(content: unknown): void
  • toJSON(): { data: any; id: number; receptive: boolean }
  • The toJSON overload for JSON.stringify.

    since

    0.0.1

    Returns { data: any; id: number; receptive: boolean }

    • data: any
    • id: number
    • receptive: boolean
  • toString(): string

Generated using TypeDoc