new Context()
A collection of registered calls and messages.
Many peers
can be linked to a context.
- Source:
Methods
addClientCall(id, name, input, output, handleropt)
Register a call a client can send to a server
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id |
number | ||
name |
string | ||
input |
string | Object | see Type constructor |
|
output |
string | Object | see Type constructor |
|
handler |
function |
<optional> |
required in the server side |
- Source:
addClientMessage(id, name, input, handleropt)
Register a message a cllient can send to a server
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id |
number | ||
name |
string | ||
input |
string | Object | see Type constructor |
|
handler |
function |
<optional> |
required in the server side |
- Source:
addServerCall(id, name, input, output, handleropt)
Register a call a server can send to a client
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id |
number | ||
name |
string | ||
input |
string | Object | see Type constructor |
|
output |
string | Object | see Type constructor |
|
handler |
function |
<optional> |
required in the client side |
- Source:
addServerMessage(id, name, input, handleropt)
Register a message a server can send to a client
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id |
number | ||
name |
string | ||
input |
string | Object | see Type constructor |
|
handler |
function |
<optional> |
required in the client side |
- Source: