Hierarchy (view full)

Constructors

Properties

Methods

  • Send an answer to server with given data.

    Parameters

    • type: string

      response type, i.e: 'invitation',...

    • id: string

      request id

    • payload: Body

      response data.

    Returns Promise<Record<string, any>>

    Throws

    if server returns an error

  • Cancel a previous request.

    Parameters

    • type: string

      response type, i.e: 'invitation',...

    • id: string

      request id

    • payload: Body

    Returns Promise<Record<string, any>>

    Throws

    if server returns an error

  • Send a request to server with given data.

    Parameters

    • type: string

      request type, i.e: 'createRoom', 'invitation',...

    • id: string

      request id

    • body: Body

      requested body.

    • Optional retry: number

      if specified and an id is provided, when an answer is not received for this requested id, message will be send again periodically.

    Returns Promise<Record<string, any>>

    resolved with server response.

    Throws

    if server returns an error