API Reference
    Preparing search index...

    Class MemoryDriver

    In-memory signaling driver for intra-process communication.

    This driver is useful for testing and debugging purposes, but is not suitable for production use due to its limitations (e.g. single-process scope).

    const driver = new MemoryDriver();
    

    Implements

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Publish a signaling message to a namespace.

      Parameters

      • namespace: string[]

        Target namespace segments.

      • message: any

      Returns void

    • Unsubscribe a previously registered namespace handler.

      Parameters

      • namespace: string[]

        Namespace segments used for message routing.

      • handler: (data: any) => void

        Handler reference originally passed to on.

      Returns void

    • Subscribe to signaling messages in a namespace.

      Parameters

      • namespace: string[]

        Namespace segments used for message routing.

      • handler: (data: any) => void

        Callback invoked with message payload.

      Returns void