This commit is contained in:
esrrhs committed 2018-12-22 18:36:29 +08:00
1 parent 0481f15f07
commit e1cdec8c00
1 file changed
+5 -7
+5 -7
View File
@@ -241,13 +241,11 @@ func (p *Client) checkTimeoutConn() {
}
func (p *Client) ping() {
if p.sendPacket == 0 {
now := time.Now()
b, _ := now.MarshalBinary()
sendICMP(p.id, p.sequence, *p.conn, p.ipaddrServer, p.targetAddr, "", (uint32)(PING), b, p.sproto, p.rproto)
fmt.Printf("ping %s %s %d %d %d %d\n", p.addrServer, now.String(), p.sproto, p.rproto, p.id, p.sequence)
p.sequence++
}
now := time.Now()
b, _ := now.MarshalBinary()
sendICMP(p.id, p.sequence, *p.conn, p.ipaddrServer, p.targetAddr, "", (uint32)(PING), b, p.sproto, p.rproto)
fmt.Printf("ping %s %s %d %d %d %d\n", p.addrServer, now.String(), p.sproto, p.rproto, p.id, p.sequence)
p.sequence++
}
func (p *Client) showNet() {