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

Properties

Protected Readonly channelHandlers

channelHandlers: ConnectionHandlers<WebSocketChannel> = new MessagingContribution.ConnectionHandlers<WebSocketChannel>()

Protected Readonly connectionHandlers

Protected Readonly messagingContributions

messagingContributions: ContributionProvider<Contribution>

Protected Readonly windowChannels

windowChannels: Map<number, Map<number, WebSocketChannel>> = new Map<number, Map<number, WebSocketChannel>>()

Methods

Protected createChannel

Protected handleIpcMessage

  • handleIpcMessage(event: IpcMainEvent, data: string): void

Protected init

  • init(): void

ipcChannel

  • ipcChannel(spec: string, callback: (params: any, channel: WebSocketChannel) => void): void

listen

  • listen(spec: string, callback: (params: PathParams, connection: MessageConnection) => void): void

onStart

  • onStart(): void