[Qt-interest] set connection timeout on QTcpSocket/AbstractSocket

Alex shao.tu at gmail.com
Thu Jul 30 13:59:38 CEST 2009


Could be.
It works fine for me under CentOS5.



2009/7/30 Donal O'Connor <donaloconnor at gmail.com>

> I've tried that but it seems to not make a difference:
>
> Whole app locks up, dunno if it a windows mobile problem or not.
>
> I tried the fortune client example and that locks up too for about 30
> seconds.
>
>
>
>
> On Thu, Jul 30, 2009 at 12:43 PM, Alex <shao.tu at gmail.com> wrote:
>
>> Use waitForConnected(timeout) after connectToHost().
>> It returns once the connection is established or timeout occurs.
>>
>>
>>
>>
>> 2009/7/30 Donal O'Connor <donaloconnor at gmail.com>
>>
>>> Hi,
>>>
>>> I've searched the docs everywhere but I cannot see if it is possible to
>>> set a timeout value when connecting to a host.
>>>
>>> I'm using connectToHost(server,port). This seems to hang my application
>>> on Windows CE until it times out about 10 - 30 seconds later when I receive
>>> the error via the
>>> error() signal emitted.
>>>
>>> Is there a way to set a timeout value so I don't have to wait this long
>>> before showing the error to the user?
>>>
>>>
>>> Thanks,
>>>
>>> Regards,
>>> Donal
>>>
>>> _______________________________________________
>>> Qt-interest mailing list
>>> Qt-interest at trolltech.com
>>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>>
>>>
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090730/8b498fbe/attachment.html 


More information about the Qt-interest-old mailing list