Options
All
  • Public
  • Public/Protected
  • All
Menu

Class default

Transports facilitate the exchange of messages between Server and Client. The transport can be used either as a server (listening for connections) or as a client (maintaining a single connection to a server).

Hierarchy

Constructors

Properties

Methods

Constructors

constructor

  • Creates a Transport object.

    Parameters

    • serializer: default

      The serializer that will be used to serialize and deserialize requests.

    Returns default

Properties

Protected serializer

serializer: default

Methods

Abstract send

  • send(message: any): Promise<any>
  • This method will be used to send a Message to the server, using the serializer, via the underlying protocol.

    async

    Parameters

    • message: any

      The message to send to the server.

    Returns Promise<any>

    • A Promise that will resolve when the message has been sent.

Static uniqueId

  • uniqueId(): Uint8Array
  • Generates a unique id that can be used to distinguish between connected clients. The unique id will be a UUID v4 returned as a Uint8Array.

    Returns Uint8Array

Generated using TypeDoc