comparison www/m/js/nodescore-slides.js @ 49:ddb09f0a67fd

begining of attempt at modularisation
author tzara <rc-web@kiben.net>
date Sat, 13 Oct 2012 00:17:52 +0000
parents 7f0485e0d0ff
children 66bf613fb818
comparison
equal deleted inserted replaced
48:eee1afe759d7 49:ddb09f0a67fd
179 // no! the server broadcasts the ping and the clients emit the pong! 179 // no! the server broadcasts the ping and the clients emit the pong!
180 // ah but then the time reported back from the server needs to be targeted 180 // ah but then the time reported back from the server needs to be targeted
181 // to specific client.. 181 // to specific client..
182 ////////////////////////////////////////////// 182 //////////////////////////////////////////////
183 // Latency "Pong" 183 // Latency "Pong"
184
185 socket.on("timeFromServer", function(n) { 184 socket.on("timeFromServer", function(n) {
186 socket.emit("clientTimeResponse",n); 185 socket.emit("clientTimeResponse",n); });
187 }); 186
188 socket.on("latencyFromServer", function(latency) { 187 socket.on("latencyFromServer", function(latency) {
189 $("#client_latency").text("Latency: "+latency+"ms.") 188 $("#client_latency").text("Latency: "+latency+"ms.")
190 //console.log(latency) 189 //console.log(latency)
191 }); 190 });
192 191