Answer the question
In order to leave comments, you need to log in
Is it possible in node.js (net module) to accept corrupted data via TCP/IP?
Hello, there is a server that sends xml documents:
<xml>DATA</xml>
<xml>text</xml>
var net = require('net');
var client = net.connect({port: 8124},
client.on('data', function(data) {
console.log(data.toString());
});
client.on('data'
<xml>DAext</xml>
<xml>teTA</xml>
Answer the question
In order to leave comments, you need to log in
in theory, the operating system should take care of this, which, having received a beaten tcp packet, will check the hash sum with the one indicated in the packet headers and simply throw it away, after which the sender will receive an ICMP error message, and he will send the packet again.
The TCP mechanism provides a connection-preset data stream, re-requests data in case of data loss, and eliminates duplication when receiving two copies of the same packet, thereby guaranteeing, unlike UDP, the integrity of the transmitted data and notification of the sender about the results of the transmission.(c) Wikipedia
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question