[Qt-interest] QTcpServer timeout ?

Atlant Schmidt aschmidt at dekaresearch.com
Wed Jul 21 15:07:18 CEST 2010


Stephen:

  You are correct that generic TCP connections don't "inherently" time out.
  But many, many TCP connections in the real world (in the situations I
  mentioned such as firewalls, public carriers, and the like) absolutely
  DO timeout.

  I don't know the specifics of the TCP connection being discussed by
  David, but I do know that real world software that traverses real world
  networks will definitely have to deal with the possibility of TCP con-
  nections dropping due to inactivity. If you don't believe me, Google
  for "tcp inactivity timeout":

    http://www.google.com/search?q=tcp+inactivity+timeout


  It's certainly possible this isn't David's problem, but this possibility
  shouldn't be dismissed out-of-hand.

                                        Atlant

________________________________
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Stephen Collyer
Sent: Wednesday, July 21, 2010 8:38 AM
Cc: QtInterest
Subject: Re: [Qt-interest] QTcpServer timeout ?

On 20 July 2010 20:50, David Boosalis <david.boosalis at gmail.com<mailto:david.boosalis at gmail.com>> wrote:

II 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.

TCP connections don't time out for lack of activity. I see below that you've tried
to fix the problem by enabling the Keepalive timeout on the socket, but I'd
be surprised if that fixes the problem, as it essentially does the opposite of
what you want: it forces the kernel to close the socket underneath your app.
if the TCP stack gets no response from the other end of the connection.

If your connection is "going to sleep", what actually happens in your program,
when you try to send, or expect to receive, data ?

--
Stephen Collyer


________________________________
This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100721/ddeddc73/attachment.html 


More information about the Qt-interest-old mailing list