Function broadcast

  • Send a message to all clients connected to this room

    • connection: - {} send to every connections - should either be a real client you are emulating (found in api.connections) - a mock
    • room is the string name of an already-existing room
    • message can be anything: string, json, object, etc

    Parameters

    • connection: Partial<Connection>
    • room: string
    • message: any

    Returns Promise<void>