Update socket.io to version 1.4.0
This commit is contained in:
parent
1ac69709ee
commit
eeaffe1f61
7 changed files with 35 additions and 7 deletions
|
|
@ -242,6 +242,9 @@ function handleConnection(sock) {
|
|||
module.exports = {
|
||||
init: function (srv, webConfig) {
|
||||
var bound = {};
|
||||
const ioOptions = {
|
||||
perMessageDeflate: Config.get("io.per-message-deflate")
|
||||
};
|
||||
var io = sio.instance = sio();
|
||||
|
||||
io.use(handleAuth);
|
||||
|
|
@ -259,7 +262,7 @@ module.exports = {
|
|||
}
|
||||
|
||||
if (id in srv.servers) {
|
||||
io.attach(srv.servers[id]);
|
||||
io.attach(srv.servers[id], ioOptions);
|
||||
} else {
|
||||
var server = require("http").createServer().listen(bind.port, bind.ip);
|
||||
server.on("clientError", function (err, socket) {
|
||||
|
|
@ -268,7 +271,7 @@ module.exports = {
|
|||
} catch (e) {
|
||||
}
|
||||
});
|
||||
io.attach(server);
|
||||
io.attach(server, ioOptions);
|
||||
}
|
||||
|
||||
bound[id] = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue