mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
rename 'endpoint' to 'host' in IC data manager
This commit is contained in:
parent
2478822bb8
commit
3657d77607
1 changed files with 5 additions and 5 deletions
|
@ -26,19 +26,19 @@ class IcDataDataManager {
|
|||
this._sockets = {};
|
||||
}
|
||||
|
||||
open(endpoint, identifier) {
|
||||
open(host, identifier) {
|
||||
// pass signals to onOpen callback
|
||||
if (this._sockets[identifier] != null)
|
||||
return; // already open?
|
||||
|
||||
this._sockets[identifier] = new WebsocketAPI(endpoint, { onOpen: (event) => this.onOpen(event, identifier, true), onClose: (event) => this.onClose(event, identifier), onMessage: (event) => this.onMessage(event, identifier) });
|
||||
this._sockets[identifier] = new WebsocketAPI(host, { onOpen: (event) => this.onOpen(event, identifier, true), onClose: (event) => this.onClose(event, identifier), onMessage: (event) => this.onMessage(event, identifier) });
|
||||
}
|
||||
|
||||
update(endpoint, identifier) {
|
||||
update(host, identifier) {
|
||||
if (this._sockets[identifier] != null) {
|
||||
if (this._sockets[identifier].endpoint !== endpoint) {
|
||||
if (this._sockets[identifier].host !== host) {
|
||||
this._sockets[identifier].close();
|
||||
this._sockets[identifier] = new WebsocketAPI(endpoint, { onOpen: (event) => this.onOpen(event, identifier, false), onClose: (event) => this.onClose(event, identifier), onMessage: (event) => this.onMessage(event, identifier), onError: (error) => this.onError(error, identifier) });
|
||||
this._sockets[identifier] = new WebsocketAPI(host, { onOpen: (event) => this.onOpen(event, identifier, false), onClose: (event) => this.onClose(event, identifier), onMessage: (event) => this.onMessage(event, identifier), onError: (error) => this.onError(error, identifier) });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue