A standardized way socket messages are dispatched and their responses are handled

Methods

  • Send a socket request to all other clients and handle their responses.

    Parameters

    • eventName: string

      The socket event name being handled

    • request: any

      Request data provided to the Socket event

    Returns Promise<SocketResponse>

    A Promise which resolves to the SocketResponse

  • Handle an error returned from the database, displaying it on screen and in the console

    Parameters

    • err: Error

      The provided Error message

    Returns Error