[Qt-interest] Major bug in QAbstractSocket'smethodwaitForReadyRead()

Patric userqt at gmail.com
Thu Jun 25 14:43:58 CEST 2009


Thank you for answer, John.
Actually the method is somethimes not working even if the network state is 
connected and OK.
Maybe I should have mentioned it. So I made some tests and send the result 
to the mail list.

I also beleive this mai be connected to my problem. 
http://www.archivum.info/qt-interest@trolltech.com/2008-11/msg00322.html

I'm sure anyone who plays a lot with network oriented use would notice this.

Best regards,
Patric


----- Original Message ----- 
From: "John McClurkin" <jwm at nei.nih.gov>
To: <qt-interest at trolltech.com>
Sent: Thursday, June 25, 2009 3:05 PM
Subject: Re: [Qt-interest] Major bug in 
QAbstractSocket'smethodwaitForReadyRead()


> Patric wrote:
>> Thank you for answer, Srdjan,
>> the problem here is that the method don't wait for the timeout, which
>> makes it unsusable. But it's a mistery why somethimes it works,
>> somethimes not.
>
> I don't think that this any mystery. By your own tests, waitForReadyRead
> waits the designated period when the network is functioning correctly,
> but doesn't wait when there is a network error. Isn't this just what the
> documentation below says? In my opinion, this is correct. If you have a
> functioning network, it makes sense to wait because, though the other
> computer may be busy now, it may send data in the next couple of
> seconds. However, if you don't have a functioning network, there will
> never be any data, so why wait?
>
>>>> http://doc.trolltech.com/4.5/qabstractsocket.html#waitForReadyRead
>>>
>>> "The function returns true if the readyRead() signal is emitted and
>>> there is data available for reading; otherwise it returns false (if an
>>> error occurred or the operation timed out)."
>>>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
> 




More information about the Qt-interest-old mailing list