We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5d482f commit 392fe98Copy full SHA for 392fe98
app.js
@@ -176,7 +176,9 @@ var server = ws.createServer(function(connect){
176
}).listen(3000);
177
178
function broadcast(str) {
179
+ console.log('broadcast:'+str);
180
server.connections.forEach(function(connection) {
181
+ console.log('connection:'+connection);
182
connection.sendText(str);
183
})
184
}
views/index.html
@@ -320,7 +320,7 @@
320
321
websocket.onmessage = function(e){
322
var obj = JSON.parse(e.data);
323
- // console.log(obj);
+ console.log(obj);
324
if(obj.uid == user.userid){
325
createChat(obj,true);
326
}else{
0 commit comments