Skip to content

Commit 392fe98

Browse files
committed
asd
1 parent c5d482f commit 392fe98

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ var server = ws.createServer(function(connect){
176176
}).listen(3000);
177177

178178
function broadcast(str) {
179+
console.log('broadcast:'+str);
179180
server.connections.forEach(function(connection) {
181+
console.log('connection:'+connection);
180182
connection.sendText(str);
181183
})
182184
}

views/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@
320320

321321
websocket.onmessage = function(e){
322322
var obj = JSON.parse(e.data);
323-
// console.log(obj);
323+
console.log(obj);
324324
if(obj.uid == user.userid){
325325
createChat(obj,true);
326326
}else{

0 commit comments

Comments
 (0)