add
This commit is contained in:
parent
a442584b89
commit
f46cac4904
@ -35,6 +35,7 @@ type ServerConn struct {
|
|||||||
rproto int
|
rproto int
|
||||||
echoId int
|
echoId int
|
||||||
echoSeq int
|
echoSeq int
|
||||||
|
sendEchoId int
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Server) Run() {
|
func (p *Server) Run() {
|
||||||
@ -142,6 +143,11 @@ func (p *Server) Recv(conn *ServerConn, id string, src *net.IPAddr) {
|
|||||||
|
|
||||||
sendICMP(conn.echoId, conn.echoSeq, *p.conn, src, "", id, (uint32)(DATA), bytes[:n], conn.rproto, -1)
|
sendICMP(conn.echoId, conn.echoSeq, *p.conn, src, "", id, (uint32)(DATA), bytes[:n], conn.rproto, -1)
|
||||||
|
|
||||||
|
if conn.sendEchoId == conn.echoId {
|
||||||
|
conn.echoSeq++
|
||||||
|
}
|
||||||
|
conn.sendEchoId = conn.echoId
|
||||||
|
|
||||||
p.sendPacket++
|
p.sendPacket++
|
||||||
p.sendPacketSize += (uint64)(n)
|
p.sendPacketSize += (uint64)(n)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user