项目作者: cloverstd

项目描述 :
ping over a tcp connection
高级语言: Go
项目地址: git://github.com/cloverstd/tcping.git
创建时间: 2017-06-25T12:55:56Z
项目社区:https://github.com/cloverstd/tcping

开源协议:MIT License

下载


tcping

tcping is like tcping.exe, but written with Golang.

Usage

  • The default count of ping is 4.

  • If the port is omitted, the default port is 80.

  • The default interval of ping is 1s.

  • The default timeout of ping is 1s.

ping tcp

  1. > tcping google.com 443
  2. Ping tcp://google.com:443 - Connected - time=15.425732ms
  3. Ping tcp://google.com:443 - Connected - time=2.628025ms
  4. Ping tcp://google.com:443 - Connected - time=2.400356ms
  5. Ping tcp://google.com:443 - Connected - time=1.967587ms
  6. Ping statistics tcp://google.com:443
  7. 4 probes sent.
  8. 4 successful, 0 failed.
  9. Approximate trip times:
  10. Minimum = 1.967587ms, Maximum = 15.425732ms, Average = 5.605425ms

ping http

  1. > tcping -H hui.lu
  2. Ping http://hui.lu:80 - http is open - time=232.880173ms method=GET status=200 bytes=10317
  3. Ping http://hui.lu:80 - http is open - time=60.096446ms method=GET status=200 bytes=10317
  4. Ping http://hui.lu:80 - http is open - time=56.750403ms method=GET status=200 bytes=10317
  5. Ping http://hui.lu:80 - http is open - time=57.886907ms method=GET status=200 bytes=10317
  6. Ping statistics http://hui.lu:80
  7. 4 probes sent.
  8. 4 successful, 0 failed.
  9. Approximate trip times:
  10. Minimum = 56.750403ms, Maximum = 232.880173ms, Average = 101.903482ms