Results 1 to 3 of 3

Thread: QTcpSocket and keep-alive option.

  1. #1
    Join Date
    Jan 2006
    Location
    Boston, MA
    Posts
    40
    Thanks
    1
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default QTcpSocket and keep-alive option.

    Can't find how to set keep-alive option for sockets. Is it possible to use with QTcpSocket ?
    Any ideas ?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QTcpSocket and keep-alive option.

    As far as I know, TCP protocol does not provide any keep-alive mechanism. Are you talking about HTTP connection? If so, have you noticed QHttp?
    J-P Nurmi

  3. #3
    Join Date
    Jan 2006
    Location
    Boston, MA
    Posts
    40
    Thanks
    1
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QTcpSocket and keep-alive option.

    Actually, I already got it working. Although it required some modification of QAbstractSocket and QNativeSocketEngine =)

    http://msdn2.microsoft.com/en-us/library/ms740476.aspx
    http://tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/

    Thanks.

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.