mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
some more renaming
This commit is contained in:
parent
9de3147406
commit
bd45f538c7
34 changed files with 0 additions and 0 deletions
|
|
@ -1,32 +0,0 @@
|
|||
define(['socket.io'], function(io) {
|
||||
|
||||
function Socket(server, options, coordinator) {
|
||||
options.logLevel = typeof options.logLevel != 'undefined'
|
||||
? options.logLevel
|
||||
: 0;
|
||||
|
||||
this.coordinator = coordinator;
|
||||
this.socket = io.listen(server);
|
||||
|
||||
this.init(options);
|
||||
}
|
||||
|
||||
Socket.prototype.init = function(options){
|
||||
|
||||
var self = this;
|
||||
this.socket.configure('development', function(){
|
||||
this.set('log level', options.logLevel);
|
||||
});
|
||||
|
||||
this.socket.on('connection', function(user){
|
||||
self.onConnection(user);
|
||||
});
|
||||
}
|
||||
|
||||
Socket.prototype.onConnection = function(socketLink){
|
||||
this.coordinator.createUser(socketLink);
|
||||
}
|
||||
|
||||
return Socket;
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue