Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ElectronWebSocketConnectionProvider

Customized connection provider between the frontend and the backend in electron environment. This customized connection provider makes sure the websocket connection does not try to reconnect once the electron-browser window is refreshed. Otherwise, backend resources are not disposed.

Hierarchy

Implements

Index

Constructors

Properties

channelMultiplexer?: ChannelMultiplexer
onIncomingMessageActivityEmitter: Emitter<void> = ...
onSocketDidCloseEmitter: Emitter<void> = ...
onSocketDidOpenEmitter: Emitter<void> = ...
reconnectChannelOpeners: (() => Promise<void>)[] = []
socket: Socket<DefaultEventsMap, DefaultEventsMap>
stopping: boolean = false

Do not try to reconnect when the frontend application is stopping. The browser is navigating away from this page.

Accessors

  • get onIncomingMessageActivity(): Event<void>
  • get onSocketDidClose(): Event<void>
  • get onSocketDidOpen(): Event<void>

Methods

  • createHttpWebSocketUrl(path: string): string
  • createSocketIoPath(url: string): undefined | string
  • createWebSocket(url: string): Socket<DefaultEventsMap, DefaultEventsMap>
  • createWebSocketUrl(path: string): string
  • fireSocketDidClose(): void
  • fireSocketDidOpen(): void
  • initializeMultiplexer(): void
  • onStop(): void
  • toIWebSocket(socket: Socket<DefaultEventsMap, DefaultEventsMap>): IWebSocket
  • createProxy<T>(container: Container, path: string, arg?: object): JsonRpcProxy<T>