Tilde Friends process management, in JavaScript.
◆ broadcast()
| function broadcast |
( |
|
message | ) |
|
Send a message to all other instances of the same app.
- Parameters
-
- Returns
- A promise.
◆ broadcastAppEventToUser()
| function broadcastAppEventToUser |
( |
|
user, |
|
|
|
packageOwner, |
|
|
|
packageName, |
|
|
|
eventName, |
|
|
|
argv |
|
) |
| |
Send a message to all instances of the same app running as the same user.
- Parameters
-
| user | The user. |
| packageOwner | The owner of the app. |
| packageName | The name of the app. |
| eventName | The name of the event. |
| argv | The arguments to pass. |
- Returns
- A promise.
◆ broadcastEvent()
| function broadcastEvent |
( |
|
eventName, |
|
|
|
argv |
|
) |
| |
Broadcast a named event to all registered apps.
- Parameters
-
| eventName | the name of the event. |
| argv | Arguments to pass to the handlers. |
- Returns
- A promise.
◆ getUser()
| function getUser |
( |
|
caller, |
|
|
|
process |
|
) |
| |
Get user context information for a call.
- Parameters
-
| caller | The calling process. |
| process | The receiving process. |
◆ invoke()
| function invoke |
( |
|
handlers, |
|
|
|
argv |
|
) |
| |
Invoke a handler.
- Parameters
-
| handlers | The handlers on which to invoke the callback. |
| argv | Arguments to pass to the handlers. |
- Returns
- A promise.
◆ postMessageInternal()
| function postMessageInternal |
( |
|
from, |
|
|
|
to, |
|
|
|
message |
|
) |
| |
Send a message.
- Parameters
-
| from | The calling process. |
| to | The receiving process. |
| message | The message. |
- Returns
- A promise.
◆ sendStats()
Send periodic stats to all clients.
◆ updateAccounts()
| function updateAccounts |
( |
| ) |
|
Send any changed account information.
◆ g_update_accounts_scheduled
| let g_update_accounts_scheduled |
Whether updating accounts information is currently scheduled.
◆ getProcessBlob
Get or create a process for an app blob.
- Parameters
-
| blobId | The blob identifier. |
| key | A unique key for the invocation. |
| options | Other options. |
- Returns
- The process.
◆ gProcesses
◆ gStatsTimer
Whether stats are currently being sent.