Constructor
new Transmitter(client)
- Source:
Properties:
Name | Type | Description |
---|---|---|
pid |
String | Process ID |
commands |
Map | IPC commands |
Creates a new Transmitter instance
Parameters:
Name | Type | Description |
---|---|---|
client |
Client | Client instance |
Methods
awaitResponse(op, d) → {Promise.<*>}
- Source:
Awaits for a certain response
Parameters:
Name | Type | Description |
---|---|---|
op |
String | op code |
d |
* | Attached data |
Returns:
- Type
- Promise.<*>
register(command) → {Transmitter}
- Source:
Registers an IPC command
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
command |
function | Command function Properties
|
Returns:
- Type
- Transmitter
send(event, data)
- Source:
Sends a message to the master IPC process
Parameters:
Name | Type | Description |
---|---|---|
event |
String | Event name |
data |
* | Attached data |
unregister(name) → {Transmitter}
- Source:
Unregisters an IPC command by name
Parameters:
Name | Type | Description |
---|---|---|
name |
String | Name of the IPC command |
Returns:
- Type
- Transmitter