[Qt-interest] QTcpServer timeout ?

David Boosalis david.boosalis at gmail.com
Tue Jul 20 21:50:39 CEST 2010


I have Qt Client applications establishing  connections to server apps based
using QtTcpServer(s).  The sockets that send data quite often have no
problem staying connected all day.  However the sockets that send notices
maybe one every two hours or perhaps just once a day tend to die. I never
see a disconnect, but the socket just seems to go to sleep as data fails to
arrive to the server.  I was wondering if a time out occurring due to  the
lack of activity going across the socket.  I looked at the QTcpServer class
for a method that might turn off such a timer but did not see any.  Perhaps
this behaviour goes beneath QT and into the  Linux Tcp Server design. If so
is there a low level call I can make on the socket ID to keep the connection
always alive.  I am thinking about sending a ping every 5 minutes on these
sockets.

Any advise on how best to fix this time out is very much appreciated.

-David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100720/0cf65d3b/attachment.html 


More information about the Qt-interest-old mailing list