Hook.js load websocket.js only if specifield in beef configuration file

if websocket is disabled all work normally
 if websocket is enabled have trouble in command.rb
This commit is contained in:
Graziano Felline
2012-04-12 19:01:49 +02:00
parent af9b3c97b5
commit 23f782b8d8
10 changed files with 105 additions and 97 deletions

View File

@@ -86,14 +86,13 @@ beef.net = {
//Queues the current command and flushes the queue straight away
send: function(handler, cid, results, callback) {
/*@todo insert ceck websocket up?*/
console.log("inside SEND socket status "+beef.websocket.socket);
if (beef.websocket.socket == null){
// if ( typeof beef.websocket == "undefined"){
this.queue(handler, cid, results, callback);
this.flush(); }
else
beef.websocket.send(results);
this.flush();
//}
// else
// beef.websocket.send(results);
},
//Flush all currently queued commands to the framework