1
0
mirror of https://github.com/taigrr/go-fastping synced 2025-01-18 05:03:15 -08:00

46 Commits

Author SHA1 Message Date
Anton Skorokhod
a06009512e Option to specify source ip for ping 2015-08-17 23:04:15 +09:00
Tatsushi Demachi
5bf6f7ec59 Remove golang.org/x/net/internal/iana dependency
Since Go 1.5, internal package rule (see
https://golang.org/s/go14internal for more details) applies to GOPATH
packages. It prevents this package from loading iana package and causes
package building failure.

This fixes it by adding its own ICMP protocol constants and removing
iana package dependency.

Fix #10
2015-07-23 23:31:02 +09:00
Murilo Santana
d19ff13e39 checking errors 2015-04-25 08:46:50 +09:00
Murilo Santana
9078c8f204 check length after adding as well 2015-04-25 08:46:50 +09:00
Murilo Santana
42027cc47f adding RemoveIP and RemoveIPAddr funcs 2015-04-25 08:46:50 +09:00
Tatsushi Demachi
41b7495ae3 Add non-privileged datagram-oriented ICMP endpoints mode using UDP 2015-01-11 00:20:08 +09:00
Tatsushi Demachi
805934dbbf Change to use icmp.ListenPacket instead of net.ListenIP 2015-01-10 18:17:52 +09:00
Tatsushi Demachi
8f74a61288 Add a description about a root privilege requirement to README
Fix #8
2015-01-08 22:24:44 +09:00
Tatsushi Demachi
4188955ef5 Change to use golang.org/x/net/icmp instead of my own icmp.go 2015-01-06 20:52:41 +09:00
Matt Jibson
f2eec8c939 Allow shutdown after timeout
If a timeout has occurred, the send to recv in recvICMP would block forever
because no goroutine was receiving on that channel anymore. This leaves
behind 2 goroutines for each timeout: 1 trying to send an recv, and another
waiting for the wait group. Instead, used a buffered channel so that the
sender can send even with no listener. This cleans up the goroutines and
collects the channel.
2014-11-25 22:48:21 +09:00
Vasiliev Dmitry
13ddfb32b1 fix close connection && fix sleep in chan 2014-11-25 22:46:30 +09:00
Simon Whitehead
56843b1f9f Fixed payload size. Added tests. 2014-11-07 18:51:50 +09:00
Simon Whitehead
1a8c22e90d Added const for default packet size 2014-11-07 18:51:50 +09:00
Simon Whitehead
c6c53385e0 Added payload size 2014-11-07 18:51:50 +09:00
Tatsushi Demachi
47b4079cf0 Fix a document 2014-10-16 21:08:44 +09:00
Tatsushi Demachi
bbe9a51966 Add OnRecv and OnIdle field to Pinger. AddHandler is deprecated 2014-10-16 21:01:45 +09:00
Tatsushi Demachi
2ce592c234 Fix error message to pass http://go-lint.appspot.com/ checks 2014-10-11 15:35:11 +09:00
Tatsushi Demachi
17702e6449 Fix documents 2014-10-11 15:03:44 +09:00
Tatsushi Demachi
d22f240852 Add IPv6 support
Closes #3.
2014-10-11 14:49:38 +09:00
Tatsushi Demachi
8242021828 Fix documents 2014-10-10 20:59:57 +09:00
Tatsushi Demachi
be67e41b89 Clean up codes to pass golint checks 2014-10-10 20:51:32 +09:00
Tatsushi Demachi
be887297cb Apply go fmt 2014-08-03 20:37:27 +09:00
Tatsushi Demachi
2fb7a54c20 Add mutex 2014-08-03 20:34:54 +09:00
Tatsushi Demachi
f930d86dae Fix documents 2014-08-03 18:23:10 +09:00
Tatsushi Demachi
9bc45ffa9d Add error handlings 2014-08-03 17:54:15 +09:00
Tatsushi Demachi
9aa84098f2 Fix typos 2014-08-03 17:53:15 +09:00
Tatsushi Demachi
ee8935c046 Add documents 2014-08-03 17:52:19 +09:00
Tatsushi Demachi
d1ac219a65 Refactor RunLoop() and change its usage 2014-08-03 17:36:03 +09:00
Tatsushi Demachi
8187842419 Refactor run() 2014-08-03 10:31:58 +09:00
Tatsushi Demachi
af91e84187 Add recvICMP4 error handling 2014-08-03 09:50:33 +09:00
Tatsushi Demachi
69db984e45 Use sync.WaitGroup for waiting to finish sendICMP4 2014-08-03 07:36:16 +09:00
Tatsushi Demachi
88c0127fe9 Simplify RunLoop() call and add Stop() 2014-08-03 00:00:15 +09:00
Tatsushi Demachi
a97a44952e Fix a wrong test error message 2014-08-02 23:59:33 +09:00
Tatsushi Demachi
a83423c361 Add error handling codes to tests 2014-07-21 11:21:13 +09:00
timdufrane
0e0b3516a6 Fix error handling in AddHandler
Added correct return values so that errors can be handled.

Closes #2.
2014-07-21 11:18:26 +09:00
Matt Jibson
e7d04da2f8 Remove debug logging
Importing this package should not change the behavior of the log package.

Closes #1.
2014-07-21 11:18:11 +09:00
Tatsushi Demachi
94491434bc Change ping command loop like a RunLoop example 2014-04-22 00:15:03 +09:00
Tatsushi Demachi
5d1967e357 Fixed RunLoop test in the same way as an example 2014-04-22 00:08:42 +09:00
Tatsushi Demachi
e5a0822b78 Fix RunLoop example 2014-04-22 00:07:45 +09:00
Tatsushi Demachi
4b49bd943e Use defer when it calls Mutex Unlock 2014-04-21 23:05:59 +09:00
Tatsushi Demachi
7224648946 Fixed typo 2014-04-21 21:31:27 +09:00
Tatsushi Demachi
f81b4cf5d3 Stop to use panic 2014-04-21 10:15:18 +09:00
Tatsushi Demachi
85b47b7a02 Write README.md 2013-09-06 00:35:58 +09:00
Tatsushi Demachi
031b1120f3 Add command binary ignoring rules 2013-09-06 00:31:36 +09:00
Tatsushi Demachi
54a08af19a Initial import. 2013-09-06 00:30:54 +09:00
Tatsushi Demachi
1af7e063df Initial commit 2013-09-05 07:52:42 -07:00