mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-03-12 08:55:14 +00:00
Update websocket.js
This commit is contained in:
parent
c87f6574e2
commit
5b50b2a010
|
@ -11,35 +11,17 @@ var SYS = require("lib/system");
|
|||
var FILE = require("lib/file");
|
||||
|
||||
var WebsocketObject = function() {
|
||||
this.binPath = "bin\\websocat_nossl_win64";
|
||||
this.isSSL = false;
|
||||
|
||||
this.enableSSL = function() {
|
||||
this.isSSL = true;
|
||||
};
|
||||
|
||||
this.disableSSL = function() {
|
||||
this.isSSL = false;
|
||||
};
|
||||
this.binPath = "bin\\websocat_win64";
|
||||
|
||||
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";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user