|
@@ -1,13 +1,19 @@
|
|
|
const net = require("net");
|
|
const net = require("net");
|
|
|
|
|
|
|
|
-let socketPath = require("./src/utils/socketPath");
|
|
|
|
|
|
|
+let socketPath = require("./dst/utils/socketPath").default;
|
|
|
|
|
|
|
|
socketPath = socketPath();
|
|
socketPath = socketPath();
|
|
|
|
|
|
|
|
let con = net.createConnection(socketPath);
|
|
let con = net.createConnection(socketPath);
|
|
|
|
|
|
|
|
|
|
+con.write("register;close;");
|
|
|
|
|
+let buff = "";
|
|
|
con.on("data", d => {
|
|
con.on("data", d => {
|
|
|
- console.log(d.toString());
|
|
|
|
|
- con.write("Response");
|
|
|
|
|
|
|
+ buff += d.toString();
|
|
|
|
|
+ // console.log(d.toString());
|
|
|
con.end();
|
|
con.end();
|
|
|
-});
|
|
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
+con.on("close", ()=>{
|
|
|
|
|
+ console.log(buff);
|
|
|
|
|
+})
|