feat: 增加链路统计信息,两个链路分别显示在前端,D向A汇报D与B的信息
This commit is contained in:
6
third_party/kcp/ikcp.c
vendored
6
third_party/kcp/ikcp.c
vendored
@@ -298,6 +298,9 @@ ikcpcb *ikcp_create(IUINT32 conv, void *user)
|
||||
kcp->fastlimit = IKCP_FASTACK_LIMIT;
|
||||
kcp->nocwnd = 0;
|
||||
kcp->xmit = 0;
|
||||
kcp->timeout_retrans_total = 0;
|
||||
kcp->fast_retrans_total = 0;
|
||||
kcp->duplicate_recv_total = 0;
|
||||
kcp->dead_link = IKCP_DEADLINK;
|
||||
kcp->output = NULL;
|
||||
kcp->writelog = NULL;
|
||||
@@ -788,6 +791,7 @@ void ikcp_parse_data(ikcpcb *kcp, IKCPSEG *newseg)
|
||||
}
|
||||
else
|
||||
{
|
||||
kcp->duplicate_recv_total++;
|
||||
ikcp_segment_delete(kcp, newseg);
|
||||
}
|
||||
|
||||
@@ -1192,6 +1196,7 @@ void ikcp_flush(ikcpcb *kcp)
|
||||
needsend = 1;
|
||||
segment->xmit++;
|
||||
kcp->xmit++;
|
||||
kcp->timeout_retrans_total++;
|
||||
if (kcp->nodelay == 0)
|
||||
{
|
||||
segment->rto += _imax_(segment->rto, (IUINT32)kcp->rx_rto);
|
||||
@@ -1211,6 +1216,7 @@ void ikcp_flush(ikcpcb *kcp)
|
||||
{
|
||||
needsend = 1;
|
||||
segment->xmit++;
|
||||
kcp->fast_retrans_total++;
|
||||
segment->fastack = 0;
|
||||
segment->resendts = current + segment->rto;
|
||||
change++;
|
||||
|
||||
Reference in New Issue
Block a user