Initial commit
This commit is contained in:
commit
963c42a845
59
.idea/workspace.xml
Normal file
59
.idea/workspace.xml
Normal file
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AutoImportSettings">
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="b271f68d-d304-4d0c-ab4b-4137075c0644" name="Changes" comment="" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="ComposerSettings">
|
||||
<execution />
|
||||
</component>
|
||||
<component name="ProjectColorInfo">{
|
||||
"associatedIndex": 8
|
||||
}</component>
|
||||
<component name="ProjectId" id="2lKLmlkNTznQ00gh95czvP95i6D" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"last_opened_file_path": "D:/Develop/TCP_SEND_DATA",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}</component>
|
||||
<component name="SharedIndexes">
|
||||
<attachedChunks>
|
||||
<set>
|
||||
<option value="bundled-js-predefined-1d06a55b98c1-0b3e54e931b4-JavaScript-PS-241.17011.119" />
|
||||
<option value="bundled-php-predefined-ba97393d7c68-48a1a656d44e-com.jetbrains.php.sharedIndexes-PS-241.17011.119" />
|
||||
</set>
|
||||
</attachedChunks>
|
||||
</component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="b271f68d-d304-4d0c-ab4b-4137075c0644" name="Changes" comment="" />
|
||||
<created>1724923982430</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1724923982430</updated>
|
||||
<workItem from="1724923983446" duration="1344000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
</project>
|
||||
48
index.js
Normal file
48
index.js
Normal file
@ -0,0 +1,48 @@
|
||||
const net = require('net');
|
||||
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 {
|
||||
const to_send = data;
|
||||
client.connect(2000, '127.0.0.1', () => {
|
||||
console.log('Connected');
|
||||
client.write(to_send);
|
||||
client.end(); // Закрываем соединение после отправки данных
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}, 10)
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
client.on('close', () => {
|
||||
console.log('Connection closed');
|
||||
});
|
||||
1
to_send.txt
Normal file
1
to_send.txt
Normal file
@ -0,0 +1 @@
|
||||
è014126240067463921dedbcc9324cd è01412624006746392178e1b19324cd è014126240067463921e3983c9324cd è0141262400674639214c8a0f9324cd è0141262400674639215c59789324cd è014126240067463921a2cb689324cd
|
||||
Loading…
Reference in New Issue
Block a user