Coder Social home page Coder Social logo

tcpingsharp's Introduction

TcpingSharp

Build status

A simple, lightweight TCP Ping tool written in C#.

Downloads

Binaries available below are compiled from master branch for stability. To get the latest build, click the badge above.

OS Architecture Download
Windows x86 Download
Windows x64 Download
Windows arm Download
Windows arm64 Download
OS X / macOS x64 Download
Linux x64 Download
Linux arm Download
Linux arm64 Download

Features

  • Customizable timeout
  • Ping multiple IPs of a single domain simutaneously
  • Unix-like PING output
  • Two pinging modes

Usage

usage: tcping target [options]
  target: tcping target, can be a domain, hostname or IP
  options:
    -h, -?, --help          Print this message.
    -p, --port target_port  Set target port, default value is 80.
    -t, --timeout timeout   Set timeout, default value is 5000 (ms)
    -m, --multiple          Allow pinging multiple IPs simultaneously.
    -a, --animate           Animate output into a single line, incompatible
                              with -m option.
    -s, --stats             Periodically print statistics.
    -r, --rtt               Instead of showing time spent establishing a
                              TCP connection (~2x RTT), show half of the
                              value (~actual RTT).

Implementation

To avoid flooding the server with TCP connection requests, TcpingSharp will wait for 1 second before trying again.

To establish a TCP connection, these requests are sent/received:

1 -> [SYN]
2 <- [SYN,ACK]
3 -> [ACK]
4 -> [FIN,ACK]
5 <- [FIN,ACK]
6 -> [ACK]

Without -r option

TcpingSharp measures the time

  • from the first SYN packet is sent
  • to the last ACK packet is sent

Which is the time cost to establish a TCP connection and in theory, the sum of two client <-> server transmissions' and 5 packets' (1-2 and 3-5) time. Then TcpingSharp closes the connection safely, if established successfully.

With the -r option

TcpingSharp still measures the same time as running without -r option, but the result time is always divided in half. So every result is the average time of two client <-> server transmissions in 5 packets.

Accuracy

TcpingSharp is currently unable to give an accurate time of a single round-trip. Since even with the -r option, the average value is consisted of two different transmissions.

The first RTT is measured by:

-> [SYN]
<- [SYN,ACK]

The second RTT is measured by:

-> [ACK]
-> [FIN,ACK]
<- [FIN,ACK]

tcpingsharp's People

Contributors

elepover avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.