## Classes
Sends an IPC event with data.
PromiseFetches some data from renderer process by sending an IPC event and waiting for a response. Returns a promise that resolves when the response is received.
PromiseModule.fetch without the need to provide a timeout value.
Sets the default fetch timeout.
Sends and IPC event response for a provided fetch id.
Registers a callback to a IPC event.
Unregisters a callback.
Unregisters all callbacks.
Registers a once fired callback to a IPC event.
Sends a plain IPC event without namespacing it.
string | event name |
| [...data] | \* | data to send with the event |
## fetch(event, timeout, ...args) ⇒ Promise
Fetches some data from renderer process by sending an IPC event and waiting for a response.
Returns a promise that resolves when the response is received.
**Kind**: global function
**Access**: public
| Param | Type | Description |
| --- | --- | --- |
| event | string | name of an event |
| timeout | number | how long to wait for the response in milliseconds |
| ...args | \* | arguments to send with the event |
## call(event, ...args) ⇒ Promise
Module.fetch without the need to provide a timeout value.
**Kind**: global function
**Access**: public
| Param | Type | Description |
| --- | --- | --- |
| event | string | name of an event |
| ...args | \* | arguments to send with the event |
## setDefaultFetchTimeout(timeout)
Sets the default fetch timeout.
**Kind**: global function
| Param | Type |
| --- | --- |
| timeout | number |
## respond(event, fetchId, [...data])
Sends and IPC event response for a provided fetch id.
**Kind**: global function
**Access**: public
| Param | Type | Description |
| --- | --- | --- |
| event | string | event name |
| fetchId | number | fetch id that came with then event you are responding to |
| [...data] | \* | data to send with the event |
## on(event, callback)
Registers a callback to a IPC event.
**Kind**: global function
**Access**: public
| Param | Type | Description |
| --- | --- | --- |
| event | string | event name |
| callback | function | callback to fire |
## removeListener(module, event, callback)
Unregisters a callback.
**Kind**: global function
**Access**: public
| Param | Type | Description |
| --- | --- | --- |
| module | string | module name |
| event | string | name of an event |
| callback | function | listener to unregister |
## removeAllListeners(module, event)
Unregisters all callbacks.
**Kind**: global function
**Access**: public
| Param | Type | Description |
| --- | --- | --- |
| module | string | module name |
| event | string | name of an event |
## once(event, callback, response)
Registers a once fired callback to a IPC event.
**Kind**: global function
**Access**: public
| Param | Type | Description |
| --- | --- | --- |
| event | string | event name |
| callback | function | callback to fire |
| response | boolean | whether we are listening for fetch response |
## sendGlobal(event, [...data])
Sends a plain IPC event without namespacing it.
**Kind**: global function
**Access**: public
| Param | Type | Description |
| --- | --- | --- |
| event | string | event name |
| [...data] | \* | data to send with the event |