diff --git a/lib/websocket.js b/lib/websocket.js index af0e343..8d14c5a 100644 --- a/lib/websocket.js +++ b/lib/websocket.js @@ -11,39 +11,21 @@ var SYS = require("lib/system"); var FILE = require("lib/file"); var WebsocketObject = function() { - this.binPath = "bin\\websocat_nossl_win64"; - this.isSSL = false; + this.binPath = "bin\\websocat_win64"; - this.enableSSL = function() { - this.isSSL = true; - }; - - this.disableSSL = function() { - this.isSSL = false; - }; - this.setBinPath = function(path) { if (typeof(path) !== "undefined") { this.binPath = path; } else { var arch = SYS.getArch(); - - if (!this.isSSL) { - if(arch.indexOf("64") > -1) { - this.binPath = "bin\\websocat_nossl_win64"; - } else { - this.binPath = "bin\\websocat_nossl_win64"; - } + if(arch.indexOf("64") > -1) { + this.binPath = "bin\\websocat_win64"; } else { - if(arch.indexOf("64") > -1) { - this.binPath = "bin\\websocat_win64"; - } else { - this.binPath = "bin\\websocat_win32"; - } + this.binPath = "bin\\x86\\websocat_win32"; } } }; - + this.send = function(uri, msg) { var seed = parseInt(Math.random() * 10000); var FN = "tmp\\stdin_" + seed + ".txt"; @@ -75,7 +57,7 @@ var WebsocketObject = function() { this.create(); }; -exports.VERSIONINFO = "Websocket Lib (websocket.js) version 0.1"; +exports.VERSIONINFO = "Websocket Lib (websocket.js) version 0.2"; exports.global = global; exports.require = global.require;