• Register a stream to the server.

    Parameters

    • server: Server

      The server to register the stream model on.

    • domain: string

      The domain of the stream model.

    • model: StreamModel<unknown>

      The stream model to register.

    • props: StreamProps

      The configuration for the stream.

    Returns {
        dispatch: ((dispatcher, event) => void);
        unregister: (() => void);
    }

    An object with methods to unregister the stream and to subscribe to the stream and dispatch events to the stream.

    • dispatch: ((dispatcher, event) => void)
        • (dispatcher, event): void
        • Parameters

          • dispatcher: string
          • event: Message

          Returns void

    • unregister: (() => void)

      Unregister this model from the server.

        • (): void
        • Unregister this model from the server.

          Returns void