Results 1 to 2 of 2

Thread: Qt Websocket Catch If pong didnt reveived.

  1. #1
    Join Date
    May 2019
    Posts
    12
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Qt Websocket Catch If pong didnt reveived.

    Hello, I want to implement "heart beat" or "life" function to my program. This function will check is server or internet connection down or no based on pong receiving. How I can do "if pong didnt received in time then attempt to reconnect"?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Qt Websocket Catch If pong didnt reveived.

    Send something over websocket, start timer
    When something received stop timer.
    If timer expires then close websocket and attempt to reopen socket.

  3. The following user says thank you to ChrisW67 for this useful post:

    Bedopies (26th October 2019)

Similar Threads

  1. Qt & Qml Websocket
    By scgrant327 in forum Newbie
    Replies: 0
    Last Post: 10th July 2017, 21:11
  2. Not Able to put breakpoint inside catch() of try,catch block
    By vinothrajendran in forum Qt Programming
    Replies: 0
    Last Post: 15th July 2015, 09:22
  3. Websocket SSL
    By manip in forum Qt Programming
    Replies: 1
    Last Post: 28th November 2014, 16:52
  4. treelist didnt populate
    By ditsikts in forum Newbie
    Replies: 0
    Last Post: 2nd November 2011, 15:11
  5. Replies: 3
    Last Post: 7th August 2010, 16:12

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.