IpcMainServiceWorker

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
external fun addListener(type: EventType, listener: EventListener)
Link copied to clipboard
external fun emit(type: EventType, vararg args: Any?): Boolean
Link copied to clipboard
Link copied to clipboard
external fun getMaxListeners(): Double
Link copied to clipboard
external fun handle(channel: String, listener: Function<Any?>)
Link copied to clipboard
external fun handleOnce(channel: String, listener: Function<Any?>)

Handles a single invokeable IPC message, then removes the listener. See ipcMainServiceWorker.handle(channel, listener).

Link copied to clipboard
external fun listenerCount(type: EventType, listener: EventListener): Double
Link copied to clipboard
Link copied to clipboard
external fun off(type: EventType, listener: EventListener)
Link copied to clipboard
external fun on(channel: String, listener: Function<Unit>)

Listens to channel, when a new message arrives listener would be called with listener(event, args...).

external fun on(type: EventType, listener: EventListener)
Link copied to clipboard
external fun once(channel: String, listener: Function<Unit>)

Adds a one time listener function for the event. This listener is invoked only the next time a message is sent to channel, after which it is removed.

external fun once(type: EventType, listener: EventListener)
Link copied to clipboard
external fun prependListener(type: EventType, listener: EventListener)
Link copied to clipboard
external fun prependOnceListener(type: EventType, listener: EventListener)
Link copied to clipboard
Link copied to clipboard
external fun removeAllListeners(channel: String = definedExternally)

Removes listeners of the specified channel.

external fun removeAllListeners(type: EventType)
Link copied to clipboard
external fun removeHandler(channel: String)

Removes any handler for channel, if present.

Link copied to clipboard
external fun removeListener(channel: String, listener: Function<Unit>)

Removes the specified listener from the listener array for the specified channel.

external fun removeListener(type: EventType, listener: EventListener)
Link copied to clipboard
external fun setMaxListeners(n: Number)