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 chanel and its own multiplexer to route multiple client messages the same IPC connection.

Methods

  • handleIpcEvent(event: IpcMainEvent, data: Uint8Array): void
  • init(): void
  • ipcChannel(spec: string, callback: ((params: any, channel: Channel) => void)): void
  • onStart(): void