diff --git a/server/server.js b/server/server.js index 3d9ff44..51526c4 100644 --- a/server/server.js +++ b/server/server.js @@ -16,6 +16,7 @@ wss.on('connection', function(ws) { console.log("~~~~~~~~ WELCOME TO SERVER ~~~~~~ s:"+subscribers.length); ws.on('message', function(message) { + console.log('msg: ' + message); var parts = message.split("###"); if(parts[0] != "fileOp") { broadcastMessage(getClientId(), message); @@ -38,7 +39,6 @@ wss.on('connection', function(ws) { }); } } - console.log('msg: ' + message); }); ws.on("close", function() { @@ -57,7 +57,7 @@ wss.on('connection', function(ws) { }); function broadcastMessage(clientId, msg) { - //console.log("broadcast:"+msg+" length:"+subscribers.length); + console.log("broadcast:"+msg.split("###")[0]+" length:"+subscribers.length); for(var i=0;i