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

29 Commits

Author SHA1 Message Date
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
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
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
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
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
e5a0822b78 Fix RunLoop example 2014-04-22 00:07:45 +09:00
Tatsushi Demachi
f81b4cf5d3 Stop to use panic 2014-04-21 10:15:18 +09:00
Tatsushi Demachi
54a08af19a Initial import. 2013-09-06 00:30:54 +09:00