mirror of
https://github.com/taigrr/go-fastping
synced 2025-01-18 05:03:15 -08:00
Fix typos
This commit is contained in:
parent
ee8935c046
commit
9aa84098f2
@ -172,14 +172,14 @@ func (p *Pinger) Run() error {
|
|||||||
return p.ctx.err
|
return p.ctx.err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Invode send/receive procedure repeatedly. It sends packets to all hosts which
|
// Invoke send/receive procedure repeatedly. It sends packets to all hosts which
|
||||||
// have already been added by AddIP() etc. and wait those responses. When it
|
// have already been added by AddIP() etc. and wait those responses. When it
|
||||||
// receives a response, it calls "receive" handler registered by AddHander().
|
// receives a response, it calls "receive" handler registered by AddHander().
|
||||||
// After MaxRTT seconds, it calls "idle" handler, resend packets and wait those
|
// After MaxRTT seconds, it calls "idle" handler, resend packets and wait those
|
||||||
// response. MaxRTT works as an interval time.
|
// response. MaxRTT works as an interval time.
|
||||||
//
|
//
|
||||||
// This is a non-blocking method so immediately returns. If you want to monitor
|
// This is a non-blocking method so immediately returns. If you want to monitor
|
||||||
// and stop sending packets, use Done() and Stop() method. For example,
|
// and stop sending packets, use Done() and Stop() methods. For example,
|
||||||
//
|
//
|
||||||
// p.RunLoop()
|
// p.RunLoop()
|
||||||
// ticker := time.NewTicker(time.Millisecond * 250)
|
// ticker := time.NewTicker(time.Millisecond * 250)
|
||||||
@ -194,7 +194,7 @@ func (p *Pinger) Run() error {
|
|||||||
// ticker.Stop()
|
// ticker.Stop()
|
||||||
// p.Stop()
|
// p.Stop()
|
||||||
//
|
//
|
||||||
// For more detail, please see "cmd/ping/ping.go".
|
// For more details, please see "cmd/ping/ping.go".
|
||||||
func (p *Pinger) RunLoop() {
|
func (p *Pinger) RunLoop() {
|
||||||
p.ctx = newContext()
|
p.ctx = newContext()
|
||||||
go p.run(false)
|
go p.run(false)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user