This commit is contained in:
esrrhs committed 2019-10-26 12:07:20 +08:00
1 parent a13cd98e29
commit b15faae234
3 files changed
+19 -9

No files matched your search

+8 -4
View File
@@ -89,7 +89,8 @@ func (p *Server) processPacket(packet *Packet) {
loggo.Info("ping from %s %s %d %d %d", packet.src.String(), t.String(), packet.my.Rproto, packet.echoId, packet.echoSeq)
sendICMP(packet.echoId, packet.echoSeq, *p.conn, packet.src, "", "", (uint32)(MyMsg_PING), packet.my.Data,
(int)(packet.my.Rproto), -1, p.key,
0, 0, 0, 0)
0, 0, 0, 0,
0)
return
}
@@ -221,7 +222,8 @@ func (p *Server) RecvTCP(conn *ServerConn, id string, src *net.IPAddr) {
}
sendICMP(p.echoId, p.echoSeq, *p.conn, src, "", id, (uint32)(MyMsg_DATA), mb,
conn.rproto, -1, p.key,
0, 0, 0, 0)
0, 0, 0, 0,
0)
p.sendPacket++
p.sendPacketSize += (uint64)(len(mb))
}
@@ -275,7 +277,8 @@ func (p *Server) RecvTCP(conn *ServerConn, id string, src *net.IPAddr) {
mb, _ := proto.Marshal(f)
sendICMP(p.echoId, p.echoSeq, *p.conn, src, "", id, (uint32)(MyMsg_DATA), mb,
conn.rproto, -1, p.key,
0, 0, 0, 0)
0, 0, 0, 0,
0)
p.sendPacket++
p.sendPacketSize += (uint64)(len(mb))
}
@@ -337,7 +340,8 @@ func (p *Server) Recv(conn *ServerConn, id string, src *net.IPAddr) {
sendICMP(p.echoId, p.echoSeq, *p.conn, src, "", id, (uint32)(MyMsg_DATA), bytes[:n],
conn.rproto, -1, p.key,
0, 0, 0, 0)
0, 0, 0, 0,
0)
p.sendPacket++
p.sendPacketSize += (uint64)(n)