From 31d2be28c54df166bdd5de589d8f13131483bdf4 Mon Sep 17 00:00:00 2001 From: xl1034 Date: Sun, 27 Oct 2024 23:45:42 +0700 Subject: [PATCH] Removed the resend left for debugging the TSC printer. --- index.js | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/index.js b/index.js index 5610885..8bd0e0b 100644 --- a/index.js +++ b/index.js @@ -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'); });