[Qt-interest] Why Bus error clientSocket->waitForConnected()?
Kustaa Nyholm
Kustaa.Nyholm at planmeca.com
Sun May 2 06:36:57 CEST 2010
>http://doc.qt.nokia.com/4.6/qiodevice.html#readLine
>
>The word "blocking" doesn't appear in that documentation.
Which says:
Data is read until either of the following conditions are met:
The first '\n' character is read.
maxSize - 1 bytes are read.
The end of the device data is detected.
So my knee jerk reading would be that it should block, but I guess
it depends on what "end of the device data" means. I would have
thought that it means the stream is at end but if it means that
there is no more data available *momentarily*, then it should not
block of course.
But a readLine that terminates early just because not enough
data has arrived in time seems pretty useless to me, I would
*always* have to wrap this in a loop that checks for a complete
line having being received. Does not make sense to me.
br Kusti
More information about the Qt-interest-old
mailing list