Thread: ping... return data?

  1. #1
    Unregistered
    Guest

    ping... return data?

    is it possible to write a program that pings a certain computer and then returns the data to the program to be analized? im trying to write a program to ping proxy's and determine their response time and sort them from lowest ping to highest...

    thank you for your time

  2. #2
    Registered User Engineer's Avatar
    Join Date
    Oct 2001
    Posts
    125
    What you can you is call the 'ping' from inside you program using the system() function. In your call you can redirect the output of ping to a file. After ping did its job, you can read the contents of the file and sort the data based on your needs.

    The better, but more time-consuming solution, would be to implement your own ping process inside your program, or even as a separate process and exchange data between the two functionalities.

    Cheers.
    1 rule of the Samurai Code: if you have nothing to say, don't say anything at all!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How can I make this code more elegant?
    By ejohns85 in forum C++ Programming
    Replies: 3
    Last Post: 04-02-2009, 08:55 AM
  2. Unknown memory leak with linked lists...
    By RaDeuX in forum C Programming
    Replies: 6
    Last Post: 12-07-2008, 04:09 AM
  3. xor linked list
    By adramalech in forum C Programming
    Replies: 23
    Last Post: 10-14-2008, 10:13 AM
  4. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 11:06 AM
  5. HUGE fps jump
    By DavidP in forum Game Programming
    Replies: 23
    Last Post: 07-01-2004, 10:36 AM