Home » Projects » Tcping.php


tcping.exe - ping over a tcp connection

Description:

tcping.exe is a small console application that operates similarly to 'ping', however it works over a tcp port. Not a terribly interesting concept, but I had trouble finding a windows utility to do this that I was happy with.

Update: Feb 28 2007. Have added '-t' and '-n <count>' command line options by request.

Platform:

  • Win32 Console. Tested on XP.
  • Language:

  • C++ - Makefile included for Visual Studio
  • License:

  • The code for this program is available under the GPL.
  • This utility includes public domain code from The Winsock Programmer's FAQ, which you may also be interested in.
  • Usage:

    usage: tcping  [server-port]
    
             -t   : ping continuously until stopped via control-c
             -n 5 : for instance, send 5 pings
    
            If you don't pass server-port, it defaults to 80.
    

    Example Output:

    C:\tcping-src\>tcping www.microsoft.com
    
    Probing 207.46.198.60:80/tcp - Port is open - time=78ms
    Probing 207.46.198.60:80/tcp - Port is open - time=79ms
    Probing 207.46.198.60:80/tcp - Port is open - time=78ms
    Probing 207.46.198.60:80/tcp - Port is open - time=78ms
    
    Ping statistics for 207.46.198.60:80:
         4 probes sent.
    Approximate trip times in milli-seconds:
         Minimum = 78ms, Maximum = 79ms, Average = 78ms
    

    Download:

    tcping.exe, win32 console application
    tcping.exe, win32 console application, zipped
    source + Makefile for tcping.exe, zipped.