Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ElectronMessagingContribution

Override the browser MessagingContribution class to refuse connections that do not include a specific token.

deprecated

since 1.8.0

Hierarchy

Index

Constructors

Properties

channelHandlers: ConnectionHandlers<Channel> = ...
checkAliveTimeout: number = 30000
connectionModules: ContributionProvider<ContainerModule>
container: Container
maxHttpBufferSize: number = 1e8
messagingListener: MessagingListener
tokenValidator: ElectronTokenValidator
wsHandlers: ConnectionHandlers<Socket<DefaultEventsMap, DefaultEventsMap, DefaultEventsMap, any>> = ...
wsRequestValidator: WsRequestValidator

Methods

  • allowConnect(request: IncomingMessage): Promise<boolean>
  • createSocketContainer(socket: Socket<DefaultEventsMap, DefaultEventsMap, DefaultEventsMap, any>): Container
  • getConnectionChannelHandlers(socket: Socket<DefaultEventsMap, DefaultEventsMap, DefaultEventsMap, any>): ConnectionHandlers<Channel>
  • handleChannels(socket: Socket<DefaultEventsMap, DefaultEventsMap, DefaultEventsMap, any>): void
  • handleConnection(socket: Socket<DefaultEventsMap, DefaultEventsMap, DefaultEventsMap, any>): void
  • init(): void
  • onStart(server: Server | Server): void
  • toIWebSocket(socket: Socket<DefaultEventsMap, DefaultEventsMap, DefaultEventsMap, any>): IWebSocket
  • ws(spec: string, callback: ((params: MessagingService.PathParams, socket: Socket<DefaultEventsMap, DefaultEventsMap, DefaultEventsMap, any>) => void)): void