Removed the resend left for debugging the TSC printer.

This commit is contained in:
xl1034 2024-10-27 23:45:42 +07:00
parent 963c42a845
commit 31d2be28c5

View File

@ -4,19 +4,6 @@ const fs = require('fs');
const client = new net.Socket();
fs.readFile('to_send.txt', 'utf8', (err, data) => {
if (err) {
console.error('Error reading file:', err);
} else {
const to_send = data;
client.connect(2000, '127.0.0.1', () => {
console.log('Connected');
client.write(to_send);
client.end(); // Закрываем соединение после отправки данных
setTimeout(() => {
fs.readFile('to_send2.txt', 'utf8', (err, data) => {
if (err) {
console.error('Error reading file:', err);
} else {
@ -30,19 +17,6 @@ fs.readFile('to_send2.txt', 'utf8', (err, data) => {
});
}, 10)
});
}
});
client.on('close', () => {
console.log('Connection closed');
});