From 3657d77607da34ba765aacaa95f538190242ec5a Mon Sep 17 00:00:00 2001 From: Sonja Happ Date: Mon, 27 Apr 2020 12:56:27 +0200 Subject: [PATCH] rename 'endpoint' to 'host' in IC data manager --- src/ic/ic-data-data-manager.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ic/ic-data-data-manager.js b/src/ic/ic-data-data-manager.js index 99e37ae..5aebae9 100644 --- a/src/ic/ic-data-data-manager.js +++ b/src/ic/ic-data-data-manager.js @@ -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) }); } } }