This commit is contained in:
esrrhs committed 2018-12-22 18:29:55 +08:00
1 parent a442584b89
commit f46cac4904
1 file changed
+6
+6
View File
@@ -35,6 +35,7 @@ type ServerConn struct {
rproto int
echoId int
echoSeq int
sendEchoId int
}
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)
if conn.sendEchoId == conn.echoId {
conn.echoSeq++
}
conn.sendEchoId = conn.echoId
p.sendPacket++
p.sendPacketSize += (uint64)(n)
}