IpcHost Class

Used by applications that have a dedicated backend. IpcHosts may send messages to their corresponding IpcApp.

note if either end terminates, the other must too.

Methods

Name Description
constructor(): IpcHost    
addListener(channel: string, listener: IpcListener): RemoveFunction Static Establish a handler to receive messages sent via IpcApp.send.  
handle(channel: string, handler: (...args: any[]) => Promise<any>): RemoveFunction Static Establish a handler for an Ipc channel to receive Frontend.invoke calls  
removeListener(channel: string, listener: IpcListener): void Static Remove a previously registered listener  
send(channel: string, ...data: any[]): void Static Send a message to the frontend over an Ipc channel.  
shutdown(): Promise<void> Static Shutdown IpcHost backend.  
startup(opt?: IpcHostOpts): Promise<void> Static Start the backend of an Ipc app.  

Properties

Name Type Description
isValid Accessor StaticReadOnly boolean Determine whether Ipc is available for this backend.  
noStack Static boolean    

Defined in

Last Updated: 12 June, 2024