IpcApp Class

The frontend of apps with a dedicated backend that can use Ipc.

Methods

Name Description
constructor(): IpcApp    
addListener(channel: string, handler: IpcListener): RemoveFunction Static Establish a message handler function for the supplied channel over Ipc.  
callIpcHost<T extends AsyncMethodsOf<IpcAppFunctions>>(methodName: T, ...args: Parameters<>): Promise<PromiseReturnType<>> Static    
invoke(channel: string, ...args: any[]): Promise<any> Static Send a message to the backend via channel and expect a result asynchronously.  
removeListener(channel: string, listener: IpcListener): void Static Remove a previously registered listener  
send(channel: string, ...data: any[]): void Static Send a message over the socket.  
startup(ipc: IpcSocketFrontend, opts?: IpcAppOptions): Promise<void> Static start an IpcApp.  

Properties

Name Type Description
isValid Accessor StaticReadOnly boolean Determine whether Ipc is available for this frontend.  

Defined in

Last Updated: 11 June, 2024