Ok, I improved the function:
while (tcpSocket->canReadLine()) {
if (data == ".\r\n") {
sendCommand("QUIT");
return;
}
output.write(data);
}
while (tcpSocket->canReadLine()) {
const QByteArray data = tcpSocket->readLine();
if (data == ".\r\n") {
sendCommand("QUIT");
return;
}
output.write(data);
}
To copy to clipboard, switch view to plain text mode
I read the block line by line, the ".\r\n" sequence finished the article, so I quit the connection (205 answer will not write to file). Unfortunately, same strange behaviour: Some articles has wrong CRCs!
Are there any other bytes in each TCP data block for size, checksums, ... informations? Wherefore some articles are corrupt?
EDIT:
I've just seen, all articles has wrong CRCs!
Somewhere is wrong with reading!
Bookmarks