Code Monkey home page Code Monkey logo

tcp-ping's Introduction

TCP Ping

Author: Po-Hsuan Su (b08902107)

This is a ping tool using TCP. This tool consists of two executable, the client and the server.

This project is a homework of NTU CSIE Computer Networks, Fall 2019.

Feature highlights

Screen shot of the client

  • Can ping mutiple target simultaneously. (Implemented using std::thread)
  • Colored output.
  • Simple ping statistics.

How to use

These instructions will get you a copy of the tool up and running.

Prerequisites

  • g++
  • Boost C++ Libraries (Or more specific, the libboost-program-options-dev package)
  • GNU Make

This tool can only run on linux.

Installing

  1. Get the source code of this tool. Maybe clone from GitHub. Skip this step if you already got the source code.

  2. run make at the project root (at the same folder where this README.md file is).

If nothing goes wrong, you now get both the client and the server executable.

Running

Usage of the server:

Usage: ./server [--help] port

Positional Argument
  port - Port to listen on

Optional Arguments
  -h [ --help ]         Print help messages

The server should be started before the client.

Usage of the client:

Usage: ./client [--help] [-n num] [-t timeout] [-w wait] target1 [target2 ...]

Positional Argument
  target - Target(s) in `host:port` form, host can be in hostname or ip

Optional Arguments
  -h [ --help ]                Print help messages
  -n [ --num ] arg (=0)        Amount of packets to send to each target, 0
                               means keep sending messages until program close
  -t [ --timeout ] arg (=1000) Maximum millisecond(s) the client needs to wait
                               for each response
  -w [ --wait ] arg (=1000)    Millisecond(s) the client need to wait between
                               each ping

tcp-ping's People

Contributors

brianbbsu avatar

Stargazers

 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.