Added polling stop if websocket is up in updater.js

added hash for websocket in websocket.rb
added check for websocket existence in command.rb and net.js
added a POC onmessage function in websocket.js
added check for websocket support in init.js
added a POC send to send command output to server in beef.js
This commit is contained in:
Graziano Felline
2012-04-11 20:52:47 +02:00
parent 302512e172
commit af9b3c97b5
8 changed files with 57 additions and 15 deletions

View File

@@ -48,9 +48,16 @@ if(typeof beef === 'undefined' && typeof window.beef === 'undefined') {
* @param: {Function} the function to execute.
*/
execute: function(fn) {
this.commands.push(fn);
/*controllare se il websocket è attivo*/
},
console.log("inside execute socket status "+beef.websocket.socket);
if(beef.websocket.socket == null)
this.commands.push(fn);
else
beef.websocket.send(fn);
/*@todo controllare se il websocket è attivo in tal caso
beef.websocket.send(fn) */
// ;
},
/**