Function SubscribeFor

  • Creates a subscription for outbounds using a filter. All clients that receive the outbound data will be subscribed. Once the data is modified (route function decorated using

    Parameters

    Returns ((target, propertyKey) => void)

      • (target, propertyKey): void
      • Parameters

        • target: any
        • propertyKey: string

        Returns void

    Modifies

    or

    Modifies Matching

    with matching MessageFilter has been called), the outbound is re-sent to the clients.

    Example

    Method annotation for outbound:

    class Example {
    @Outbound("d.example")
    @SubscribeFor(new MyMessageFilter())
    async getData(connection: WebsocketConnection): Promise<any> {
    return [...];
    }
    }

Generated using TypeDoc