PDA

View Full Version : QTcpSocket reads partially string



Edder
18th July 2012, 17:42
Hello qtcentre community,

with QTcpSocket I'm connecting to an irc server and i get a response, so far so good.

Sometimes the reponse is cut off in the middle and the string looks like this:


:asimov.freenode.net 372 Rosi :- By connecting to freenode you indicate that you have read
:asimov.freenode.net 372 Rosi :- and agree to adhere to our po // this aint the end of the message!

And at the next call of readyRead() I receive the rest:


licies and procedures as per
:asimov.freenode.net 372 Rosi :- the website (http://freenode.net). We would like to remind

Is there a way to force the socket to read the whole message to the end?
Or a way to concat these strings, that they make sense?

Thank you.

wysota
18th July 2012, 20:29
Is there a way to force the socket to read the whole message to the end?
No, since there is no "end". Learn how TCP works.


Or a way to concat these strings, that they make sense?
Sure.


QString sum = string1+string2;