浏览代码

- Updated dev client script

Parad0x 5 年之前
父节点
当前提交
eae00e2109
共有 1 个文件被更改,包括 10 次插入4 次删除
  1. 10 4
      client.js

+ 10 - 4
client.js

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