BotServer
BotServer can listen on web socket. A peer can invite bot to join his WebChannel
.
He can also join one of the bot's WebChannel
.
Constructor Summary
Public Constructor | ||
public |
constructor(options: Object) Bot server settings are the same as for |
Member Summary
Public Members | ||
public |
onWebChannel: function(wc: WebChannel) |
|
public |
|
|
public |
|
Method Summary
Public Methods | ||
public |
addWebChannel(wc: WebChannel) Add |
|
public |
getWebChannel(id: number): WebChannel | null Get |
|
public |
Remove |
|
public |
Starts listen on socket. |
|
public |
stop() Stops listen on web socket. |
Public Constructors
public constructor(options: Object) source
Bot server settings are the same as for WebChannel
(see WebChannelSettings),
plus host
and port
parameters.
Params:
Name | Type | Attribute | Description |
options | Object | ||
options.connector | WEB_RTC | WEB_SOCKET |
|
Which connector is preferable during connection establishment |
options.topology | FULLY_CONNECTED |
|
Fully connected topology is the only one available for now |
options.signalingURL | string |
|
Signaling server url |
options.iceServers | RTCIceServer |
|
Set of ice servers for WebRTC |
options.host | string |
|
|
options.port | number |
|
Public Members
public onWebChannel: function(wc: WebChannel) source
public server: WebSocketServer source
public webChannels: WebChannel[] source
Public Methods
public addWebChannel(wc: WebChannel) source
Add WebChannel
.
Params:
Name | Type | Attribute | Description |
wc | WebChannel |
public getWebChannel(id: number): WebChannel | null source
Get WebChannel
identified by its id
.
Params:
Name | Type | Attribute | Description |
id | number |
public removeWebChannel(wc: WebChannel) source
Remove WebChannel
Params:
Name | Type | Attribute | Description |
wc | WebChannel |