Commit 3657d776 authored by Sonja Happ's avatar Sonja Happ

rename 'endpoint' to 'host' in IC data manager

parent 2478822b
......@@ -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) });
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment