[FSD] Gradually increase number of read lines from FSD socket

* Avoid overflow by gradually reading more lines
* Also improved sending in the same way
This commit is contained in:
Klaus Basan
2020-04-07 18:34:32 +02:00
committed by Mat Sutcliffe
parent b71dfe482c
commit ce9b9e3e5b
2 changed files with 21 additions and 8 deletions

View File

@@ -314,7 +314,8 @@ namespace BlackCore
void sendClientIdentification(const QString &fsdChallenge);
void sendIncrementalAircraftConfig();
void readDataFromSocket();
void readDataFromSocket() { this->readDataFromSocketMaxLines(); }
void readDataFromSocketMaxLines(int maxLines = -1);
QString socketErrorToQString(QAbstractSocket::SocketError error);
void parseMessage(const QString &lineRaw);