mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-08-04 05:33:10 +00:00
feature(socket) v1.0.0
This commit is contained in:
parent
5640baeeda
commit
02b326cdd1
3 changed files with 6 additions and 29 deletions
|
|
@ -47,34 +47,11 @@
|
|||
|
||||
/**
|
||||
* function listen on servers port
|
||||
* @pServer {Object} started server object
|
||||
* @server {Object} started server object
|
||||
*/
|
||||
function listen(pServer) {
|
||||
if (io) {
|
||||
io = io.listen(pServer);
|
||||
|
||||
io.set('log level', INFO_LOG_LEVEL);
|
||||
|
||||
/*
|
||||
* on Win7 application is crashing,
|
||||
* when options below is used.
|
||||
*
|
||||
* https://github.com/LearnBoost/socket.io/issues/1314
|
||||
*
|
||||
*/
|
||||
if (!WIN32) {
|
||||
io.enable('browser client minification');
|
||||
io.enable('browser client gzip');
|
||||
io.enable('browser client etag');
|
||||
}
|
||||
|
||||
io.set('transports', [
|
||||
'websocket',
|
||||
'htmlfile',
|
||||
'xhr-polling',
|
||||
'jsonp-polling'
|
||||
]);
|
||||
}
|
||||
function listen(server) {
|
||||
if (io)
|
||||
io = io.listen(server);
|
||||
|
||||
return io;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue