fastping.go
func (p *Pinger) Run() error {
	p.mu.Lock()
	p.ctx = newContext()
	p.mu.Unlock()
	p.run(true)
	p.mu.Lock()
	defer p.mu.Unlock()
	return p.ctx.err
}
func (p *Pinger) Run() error {
	p.mu.Lock()
	p.ctx = newContext()
	p.mu.Unlock()
	p.run(true)
	p.mu.Lock()
	defer p.mu.Unlock()
	return p.ctx.err
}
func ( p * Pinger ) Run ( ) error { p . mu . Lock ( ) p . ctx = newContext ( ) p . mu . Unlock ( ) p . run ( true ) p . mu . Lock ( ) defer p . mu . Unlock ( ) return p . ctx . err }
// Run invokes a single send/receive procedure. It sends packets to all hosts
// which have already been added by AddIP() etc. and wait those responses. When
// it receives a response, it calls "receive" handler registered by AddHander().
// After MaxRTT seconds, it calls "idle" handler and returns to caller with
// an error value. It means it blocks until MaxRTT seconds passed. For the
// purpose of sending/receiving packets over and over, use RunLoop().
Run invokes a single send / receive procedure . It sends packets to all hosts which have already been added by AddIP () etc . and wait those responses . When it receives a response it calls receive handler registered by AddHander () . After MaxRTT seconds it calls idle handler and returns to caller with an error value . It means it blocks until MaxRTT seconds passed . For the purpose of sending / receiving packets over and over use RunLoop () .