add
This commit is contained in:
parent
79a278a90f
commit
2dd984018c
14
client.go
14
client.go
@ -291,8 +291,8 @@ func (p *Client) AcceptTcpConn(conn *net.TCPConn) {
|
|||||||
p.sequence++
|
p.sequence++
|
||||||
sendICMP(p.id, p.sequence, *p.conn, p.ipaddrServer, p.targetAddr, clientConn.id, (uint32)(MyMsg_DATA), mb,
|
sendICMP(p.id, p.sequence, *p.conn, p.ipaddrServer, p.targetAddr, clientConn.id, (uint32)(MyMsg_DATA), mb,
|
||||||
SEND_PROTO, RECV_PROTO, p.key,
|
SEND_PROTO, RECV_PROTO, p.key,
|
||||||
p.tcpmode, p.tcpmode_buffersize, p.tcpmode_maxwin, p.tcpmode_resend_timems,
|
p.tcpmode, 0, 0, 0,
|
||||||
p.timeout)
|
0)
|
||||||
p.sendPacket++
|
p.sendPacket++
|
||||||
p.sendPacketSize += (uint64)(len(mb))
|
p.sendPacketSize += (uint64)(len(mb))
|
||||||
}
|
}
|
||||||
@ -352,8 +352,8 @@ func (p *Client) AcceptTcpConn(conn *net.TCPConn) {
|
|||||||
p.sequence++
|
p.sequence++
|
||||||
sendICMP(p.id, p.sequence, *p.conn, p.ipaddrServer, p.targetAddr, clientConn.id, (uint32)(MyMsg_DATA), mb,
|
sendICMP(p.id, p.sequence, *p.conn, p.ipaddrServer, p.targetAddr, clientConn.id, (uint32)(MyMsg_DATA), mb,
|
||||||
SEND_PROTO, RECV_PROTO, p.key,
|
SEND_PROTO, RECV_PROTO, p.key,
|
||||||
p.tcpmode, p.tcpmode_buffersize, p.tcpmode_maxwin, p.tcpmode_resend_timems,
|
p.tcpmode, 0, 0, 0,
|
||||||
p.timeout)
|
0)
|
||||||
p.sendPacket++
|
p.sendPacket++
|
||||||
p.sendPacketSize += (uint64)(len(mb))
|
p.sendPacketSize += (uint64)(len(mb))
|
||||||
}
|
}
|
||||||
@ -424,7 +424,7 @@ func (p *Client) Accept() error {
|
|||||||
clientConn.activeSendTime = now
|
clientConn.activeSendTime = now
|
||||||
sendICMP(p.id, p.sequence, *p.conn, p.ipaddrServer, p.targetAddr, clientConn.id, (uint32)(MyMsg_DATA), bytes[:n],
|
sendICMP(p.id, p.sequence, *p.conn, p.ipaddrServer, p.targetAddr, clientConn.id, (uint32)(MyMsg_DATA), bytes[:n],
|
||||||
SEND_PROTO, RECV_PROTO, p.key,
|
SEND_PROTO, RECV_PROTO, p.key,
|
||||||
p.tcpmode, p.tcpmode_buffersize, p.tcpmode_maxwin, p.tcpmode_resend_timems,
|
p.tcpmode, 0, 0, 0,
|
||||||
p.timeout)
|
p.timeout)
|
||||||
|
|
||||||
p.sequence++
|
p.sequence++
|
||||||
@ -527,8 +527,8 @@ func (p *Client) ping() {
|
|||||||
b, _ := now.MarshalBinary()
|
b, _ := now.MarshalBinary()
|
||||||
sendICMP(p.id, p.sequence, *p.conn, p.ipaddrServer, p.targetAddr, "", (uint32)(MyMsg_PING), b,
|
sendICMP(p.id, p.sequence, *p.conn, p.ipaddrServer, p.targetAddr, "", (uint32)(MyMsg_PING), b,
|
||||||
SEND_PROTO, RECV_PROTO, p.key,
|
SEND_PROTO, RECV_PROTO, p.key,
|
||||||
p.tcpmode, p.tcpmode_buffersize, p.tcpmode_maxwin, p.tcpmode_resend_timems,
|
0, 0, 0, 0,
|
||||||
p.timeout)
|
0)
|
||||||
loggo.Info("ping %s %s %d %d %d %d", p.addrServer, now.String(), p.sproto, p.rproto, p.id, p.sequence)
|
loggo.Info("ping %s %s %d %d %d %d", p.addrServer, now.String(), p.sproto, p.rproto, p.id, p.sequence)
|
||||||
p.sequence++
|
p.sequence++
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user