Class for defining models from socket communication.

Hierarchy

  • Model
    • SocketModel

Constructors

Properties

Methods

Constructors

Properties

_socketRequest: SocketRequest

Methods

  • Calls the socket event.

    Type Parameters

    • R = any

    Parameters

    • event: string

      Name of the event.

    Returns Promise<R>

    R Type of response.

  • Calls the socket event.

    Type Parameters

    • P = any
    • R = any

    Parameters

    • event: string

      Name of the event.

    • data: P

      Event parameters.

    Returns Promise<R>

    P Type of parameters.

    R Type of response.

  • Calls the socket event.

    Type Parameters

    • P = any
    • R = any

    Parameters

    • event: string

      Name of the event.

    • data: P

      Event parameters.

    • timeout: number

      Timeout of the event.

    Returns Promise<R>

    P Type of parameters.

    R Type of response.

  • Calls the socket event.

    Type Parameters

    • P = any
    • R = any

    Parameters

    • event: string

      Name of the event.

    • data: P

      Event parameters.

    • timeout: number

      Timeout of the event.

    • onProgress: ((progress: number) => void)

      Function called in the progress tick.

        • (progress): void
        • Parameters

          • progress: number

          Returns void

    Returns Promise<R>

    P Type of parameters.

    R Type of response.