From 074f9f7f2f3ec99207667da9c32526076187f5fe Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nwpope@utu.fi> Date: Fri, 23 Aug 2019 19:48:31 +0300 Subject: [PATCH] Fully working webservice --- web-service/src/index.js | 4 +--- web-service/src/peer.js | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/web-service/src/index.js b/web-service/src/index.js index 4dfc8fac9..1971f340d 100644 --- a/web-service/src/index.js +++ b/web-service/src/index.js @@ -21,7 +21,6 @@ function RGBDClient(peer, N, rate, dest) { RGBDClient.prototype.push = function(uri, frame, ttime, chunk, rgb, depth) { this.peer.send(uri, frame, ttime, chunk, rgb, depth); - console.log("Push frame: ", uri, frame, ttime, chunk); this.txcount++; } @@ -61,7 +60,7 @@ RGBDStream.prototype.addClient = function(peer, N, rate, dest) { RGBDStream.prototype.subscribe = function() { this.rxcount = 0; this.rxmax = 10; - console.log("Subscribe to ", this.uri); + //console.log("Subscribe to ", this.uri); this.peer.send("get_stream", this.uri, 10, 0, [Peer.uuid], this.uri); } @@ -215,7 +214,6 @@ app.ws('/', (ws, req) => { }); p.bind("set_pose", (uri, vec) => { - //console.log("SET POSE"); let peer = uri_data[uri].peer; if (peer) { uri_data[uri].pose = vec; diff --git a/web-service/src/peer.js b/web-service/src/peer.js index 505f53675..26a65782b 100644 --- a/web-service/src/peer.js +++ b/web-service/src/peer.js @@ -81,7 +81,7 @@ Peer.uuid = my_uuid; Peer.prototype._dispatchNotification = function(name, args) { if (this.bindings.hasOwnProperty(name)) { - console.log("Notification for: ", name); + //console.log("Notification for: ", name); this.bindings[name].apply(this, args); } else { console.log("Missing handler for: ", name); @@ -90,7 +90,7 @@ Peer.prototype._dispatchNotification = function(name, args) { Peer.prototype._dispatchCall = function(name, id, args) { if (this.bindings.hasOwnProperty(name)) { - console.log("Call for:", name, id); + //console.log("Call for:", name, id); try { let res = this.bindings[name].apply(this, args); @@ -100,7 +100,7 @@ Peer.prototype._dispatchCall = function(name, id, args) { this.close(); } } else if (this.proxies.hasOwnProperty(name)) { - console.log("Proxy for:", name, id); + //console.log("Proxy for:", name, id); args.unshift((res) => { try { this.sock.send(encode([1,id,name,res])); -- GitLab