mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-15 14:11:03 +00:00
Update websocket.js
This commit is contained in:
parent
3ae03c70a5
commit
8841b2f255
|
@ -45,7 +45,8 @@ var WebsocketObject = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.send = function(uri, msg) {
|
this.send = function(uri, msg) {
|
||||||
var FN = "stdin.txt";
|
var seed = parseInt(Math.random() * 10000);
|
||||||
|
var FN = "tmp\\stdin_" + seed + ".txt";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
FILE.writeFile(FN, msg + "\n", "utf-8");
|
FILE.writeFile(FN, msg + "\n", "utf-8");
|
||||||
|
@ -63,6 +64,8 @@ var WebsocketObject = function() {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("WebsocketObject.send() -> " + e.message);
|
console.error("WebsocketObject.send() -> " + e.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FILE.fileExists(FN)) FILE.deleteFile(FN);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.create = function() {
|
this.create = function() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user