[Qt-interest] QTcpSocket problems
Arnold Krille
arnold at arnoldarts.de
Mon Aug 3 21:49:06 CEST 2009
On Monday 03 August 2009 19:19:35 Donal O'Connor wrote:
> Thanks for the explanation. That makes sense. I've figured it out, to keep
> calling waitForReadyRead(). I'm guessing it is up to myself to Know when to
> stop calling waitForReadyRead, as in know when the end of the stream
> arrives.
Well, you should stop reading at least when the connection is closed. :-)
BTW: While it seems harder and a bit more complicated at first, I find it much
easier to use the non-blocking stuff with events and signals/slots with the
network-stuff. That way you don't get the write-while-reading problem Thiago
talks about. Just have a slot for reading (upon readyRead) and just write your
stuff when needed.
Have fun,
Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090803/e0c37299/attachment.bin
More information about the Qt-interest-old
mailing list