Results 1 to 4 of 4

Thread: How to monitor the Pc internnet connection contineously

  1. #1
    Join Date
    May 2009
    Posts
    129

    Default How to monitor the Pc internnet connection contineously

    Hi All


    I am using pjsip with Qt .

    When network connection is failed my application is going to crash , it is problem of pjsip side.

    So i want to monitor my pc network connections contineously

    Which class i have to use to see the internet connection status .

    please help me


    Thanks

    Yuvaraj R

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to monitor the Pc internnet connection contineously

    You can use a timer with some web query.... you can know the net got disconnected if u dont get the reply.
    Am not sure if this is the correct way though.

  3. #3
    Join Date
    May 2009
    Posts
    129

    Default Re: How to monitor the Pc internnet connection contineously

    i think , your way is incorrect.

    any other ways ?


    Thanks

    Yuvaraj R

  4. #4
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to monitor the Pc internnet connection contineously

    You want a portable way? Use QSocketDevice and attempt to connect to some host outside your network.

    If you want better than that, then you'll have to go down the non-portable route and use Winsock (Windows) or Berkeley sockets (Linux) and use UDP or ICMP packets. For the later you may need to be SUID root on Linux.

    Or maybe you can spawn a process and run the command "Ping" and monitor the output.

Similar Threads

  1. Client/Server Error: BadIDChoice
    By 3nc31 in forum Qt Programming
    Replies: 5
    Last Post: 27th November 2007, 10:22

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.