electron-direct-ipc - v2.2.3
    Preparing search index...

    Class DirectIpcUtility<TMessageMap, TInvokeMap, TIdentifierStrings>

    Utility process DirectIpc client Provides type-safe direct communication between utility processes and renderers

    Type Parameters

    • TMessageMap extends EventMap = EventMap

      Map of message channels to their handler function signatures (WITHOUT sender)

    • TInvokeMap extends InvokeMap = InvokeMap

      Map of invoke channels to their handler function signatures (WITHOUT sender)

    • TIdentifierStrings extends string = string

      Union of allowed identifier strings for type-safe identifier usage

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Local event emitter for lifecycle events

    Throttled message sending/receiving for high-frequency updates. Use this for lossy communication where only the latest value matters.

    // High-frequency position updates (throttled)
    directIpc.throttled.send({ identifier: 'renderer' }, 'position-update', x, y)

    // Important events (not throttled)
    directIpc.send({ identifier: 'renderer' }, 'button-clicked')

    Methods

    • Get the current default timeout

      Returns number

    • Remove a handler for a specific channel

      Type Parameters

      • T extends string | number | symbol

      Parameters

      • channel: T

      Returns void

    • Set the default timeout for invoke calls

      Parameters

      • ms: number

      Returns void