Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface UserEventResponseHandler

Package version

The handler to set user event response

Hierarchy

  • UserEventResponseHandler

Index

Methods

Methods

fail

  • fail(code: 400 | 401 | 500, detail?: undefined | string): void
  • Return failed response and the service will close the client WebSocket connection.

    Parameters

    • code: 400 | 401 | 500

      Code can be 400 user error, 401 unauthorized and 500 server error.

    • Optional detail: undefined | string

      The detail of the error.

    Returns void

success

  • success(data?: string | ArrayBuffer, dataType?: "binary" | "text" | "json"): void
  • Return success response with data to be delivered to the client WebSocket connection.

    Parameters

    • Optional data: string | ArrayBuffer

      The payload data to be returned to the client.

    • Optional dataType: "binary" | "text" | "json"

      The type of the payload data.

    Returns void

Generated using TypeDoc