Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ElectronMessagingContribution

This component replicates the role filled by MessagingContribution but for Electron. Unlike the WebSocket based implementation, we do not expect to receive connection events. Instead, we'll create channels based on incoming open events on the ipcMain channel. This component allows communication between renderer process (frontend) and electron main process.

Hierarchy

  • ElectronMessagingContribution

Implements

Index

Constructors

Properties

channelHandlers: ConnectionHandlers<Channel> = ...
windowChannelMultiplexer: Map<number, { channel: ElectronWebContentChannel; multiplexer: ChannelMultiplexer }> = ...

Each electron window has a main channel and its own multiplexer to route multiple client messages the same IPC connection.

Methods

  • disposeMultiplexer(windowId: number, multiplexer: ChannelMultiplexer, reason: string): void
  • handleIpcEvent(sender: WebContents, data: Uint8Array): void
  • init(): void
  • ipcChannel(spec: string, callback: ((params: any, channel: Channel) => void)): void
  • onStart(): void