Results 1 to 6 of 6

Thread: Does QSslSocket disconnect after a period of idle time?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Does QSslSocket disconnect after a period of idle time?

    Quote Originally Posted by scieck View Post
    If the QAbstractSocket::KeepAliveOption is set on both peers, if one of the two tcp sockets does not receive a keep-alive packet back in time is this triggered up the Qt level ?
    As already said, this is implemented by the operating system.

    so in other words by setting the keep-alive option can we findout if the other peer is still there or gone ? and can/should we trust keep-alive?
    Trust no-one. How can you be sure you're not talking to some alien implementation of the client? In networking you cannot dump any decision on your peer if you can't trust it. You have to be autonomous in your decisions. If you decide you need to receive some heart-beat from the client every 5 minutes and you don't receive it as expected then close the connection yourself without waiting for the tcp/ip stack to do it for you. And first of all understand how underlying protocols (at least tcp and ip) work, what they guarantee and what they don't guarantee.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. The following user says thank you to wysota for this useful post:

    scieck (19th April 2011)

Similar Threads

  1. Qt Idle time calculation for symbian
    By winifredrayen in forum Qt Programming
    Replies: 3
    Last Post: 10th December 2010, 14:43
  2. Qt - idle time calculation for symbian mobile
    By winifredrayen in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 10th December 2010, 13:53
  3. display selected period
    By nico.23 in forum Newbie
    Replies: 1
    Last Post: 29th May 2009, 12:37
  4. how do I get the idle time in qt2
    By pencilren in forum Qt Programming
    Replies: 1
    Last Post: 17th September 2007, 05:19
  5. drawing points on canvas after a time period
    By quickNitin in forum Qt Programming
    Replies: 3
    Last Post: 12th May 2006, 15:12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.