mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +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
|
|
@ -27,7 +27,7 @@ var CloudCmd, Util, DOM, CloudFunc, io;
|
|||
Socket.DISCONNECTED = DISCONNECTED;
|
||||
|
||||
function init(callback) {
|
||||
DOM.jsload('/socket.io/lib/socket.io.js', {
|
||||
DOM.jsload('/socket.io/socket.io.js', {
|
||||
onerror : Util.log.bind(Util, ERROR_MSG),
|
||||
onload : function() {
|
||||
Util.exec(callback);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
"dependencies": {
|
||||
"dropbox": "0.10.2",
|
||||
"minify": "~0.6.x",
|
||||
"socket.io": "0.9.16",
|
||||
"socket.io": "~1.0.0",
|
||||
"express": "~4.1.1",
|
||||
"morgan": "~1.0.0",
|
||||
"http-auth": "2.1.x",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue