This commit is contained in:
2016-02-10 18:48:47 +01:00
parent f4bc521bb3
commit d27f957f82
6 changed files with 156 additions and 6 deletions

View File

@@ -37,7 +37,10 @@ var Server = {
this.version = s;
},
//--- setIO(io)
setIO: function(io) {
},
/*
* Server Messages
@@ -78,7 +81,28 @@ var Server = {
return self.dateToString(new Date());
},
/*
* Socket.io handling
*/
//---
socketHandling: function(io) {
var self = this;
io.sockets.on('connection', function (socket) {
//
self.log('$ User connected : id=' + socket.id);
// 'disconnect'
socket.on('disconnect', function () {
self.log('$ User disconnected : id=' + socket.id);
connected = false;
});
});
},
};