The WebsocketClient has direct access to the server. It is used to simulate the client. This is usually executed on the client.

Hierarchy

Constructors

Properties

isConnected: boolean = true

states wether the client is connected

Returns

true as the client is always connected during test runs

loading: Map<string, boolean> = ...
pool: {
    WssConnected: boolean;
}

Reference to the current pool. A pool can be used to store and access data using Outbounds.

Type declaration

  • WssConnected: boolean

Accessors

Methods

  • This allows to listen for outbound data to be received.

    Parameters

    • method: string

      method label of the outbound

    • callback: ((data, specificHash, inserted, updated, deleted, length, _client) => void)

      this is called once the data has been received

        • (data, specificHash, inserted, updated, deleted, length, _client): void
        • Parameters

          • data: any
          • specificHash: number
          • inserted: any[]
          • updated: any[]
          • deleted: any[]
          • length: number
          • _client: WebsocketClient

          Returns void

    Returns void

  • This handles all received messages. Depending on expected message config and other route configuration, different methods are called.

    Parameters

    • param0: {
          data: any;
          deleted: any[];
          inserted: any[];
          length: number;
          messageId: number;
          method: string;
          specificHash: number;
          updated: any[];
      }

      message data

      • data: any
      • deleted: any[]
      • inserted: any[]
      • length: number
      • messageId: number
      • method: string
      • specificHash: number
      • updated: any[]

    Returns void

Generated using TypeDoc