This commit is contained in:
Your Name
2024-02-16 20:01:24 -06:00
parent c5af834621
commit 3bc5e8b792

View File

@@ -19,7 +19,7 @@ if (fs.existsSync( socketPath )) {
} }
const unix_socket_server = net.createServer((connection) => { const unix_socket_server = net.createServer((connection) => {
console.log('UnixSocket Client connected.'); // console.log('UnixSocket Client connected.');
let buffer = ''; let buffer = '';
@@ -35,7 +35,7 @@ const unix_socket_server = net.createServer((connection) => {
}); });
connection.on('end', () => { connection.on('end', () => {
console.log('UnixSocket Client disconnected.'); // console.log('UnixSocket Client disconnected.');
}); });
}); });
@@ -176,6 +176,7 @@ wss.on('connection', function connection(ws) {
// Send initial state // Send initial state
ws.send(calculateDiff({}, progvars)); ws.send(calculateDiff({}, progvars));
ws.send("progvars = "+JSON.stringify(progvars)+";");
ws.on('message', function incoming(message) { ws.on('message', function incoming(message) {
console.log('received: %s', message); console.log('received: %s', message);