added clean close method

This commit is contained in:
Pasquale Boemio
2013-04-29 17:20:36 +02:00
parent e6fd1fc30e
commit 2b9575c434
5 changed files with 28 additions and 12 deletions
+1
View File
@@ -28,6 +28,7 @@ wss.on('connection', function(ws) {
if (data == 'hello') { ws.send('world'); }
});
ws.on('close', function() {
console.log('Connection closed!');
});
ws.on('error', function(e) {
});