Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ServerEventDispatcher

Hierarchy

  • ServerEventDispatcher

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Private connection

connection: ServerResponse

Methods

dispatch

  • dispatch<T>(name: string, payload: T, id?: number): void
  • Dispatch a sever-sent-event on the depending connection. Will throw an error if connection is closed

    Type parameters

    • T

    Parameters

    • name: string

      Name of the dispatched event

    • payload: T

      Payload of the dispatched event

    • Optional id: number

      Optional id of the dispatched event

    Returns void