mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
Upgrade socket.io to 2.x
This commit is contained in:
parent
1bb9539530
commit
1df7258b56
6 changed files with 370 additions and 21 deletions
|
|
@ -12,7 +12,10 @@ function (io) {
|
|||
: 0;
|
||||
|
||||
this.coordinator = coordinator;
|
||||
this.socket = io.listen(server);
|
||||
this.socket = io(server, {
|
||||
'log level': options.logLevel,
|
||||
//'transports': ['websockets']
|
||||
});
|
||||
|
||||
this.init(options);
|
||||
}
|
||||
|
|
@ -20,16 +23,6 @@ function (io) {
|
|||
Socket.prototype.init = function (options) {
|
||||
|
||||
var self = this;
|
||||
this.socket.configure('development', function () {
|
||||
this.set('log level', options.logLevel);
|
||||
this.set('transports', ['websocket']);
|
||||
});
|
||||
|
||||
this.socket.configure('production', function () {
|
||||
this.set('log level', options.logLevel);
|
||||
this.set('transports', ['websocket']);
|
||||
});
|
||||
|
||||
this.socket.on('connection', function (user) {
|
||||
console.checkpoint('socket receiving connection');
|
||||
self.onConnection(user);
|
||||
|
|
|
|||
4
app/Lib/Vendor/SocketIO.js
vendored
4
app/Lib/Vendor/SocketIO.js
vendored
|
|
@ -1,3 +1,3 @@
|
|||
define(["socketio"], function() {
|
||||
define(["socketio"], function(io) {
|
||||
return io;
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue