The doc for ikcp_check says:
Determine when should you invoke ikcp_update
and in ikcp_check
|
tm_flush = _itimediff(ts_flush, current); |
|
minimal = (IUINT32)(tm_packet < tm_flush ? tm_packet : tm_flush); |
the return timepoint may be less than
ts_flush.
However, in ikcp_update
|
slap = _itimediff(kcp->current, kcp->ts_flush); |
|
if (slap >= 0) { |
|
kcp->ts_flush += kcp->interval; |
|
if (_itimediff(kcp->current, kcp->ts_flush) >= 0) { |
|
kcp->ts_flush = kcp->current + kcp->interval; |
|
} |
|
ikcp_flush(kcp); |
|
} |
ikcp_flush is called only if the current timepoint is greater or equal to ts_flush, which makes ikcp_check pointless.
The doc for
ikcp_checksays:and in
ikcp_checkkcp/ikcp.c
Line 1211 in f4f3a89
kcp/ikcp.c
Line 1222 in f4f3a89
the return timepoint may be less than
ts_flush.However, in
ikcp_updatekcp/ikcp.c
Line 1164 in f4f3a89
kcp/ikcp.c
Lines 1171 to 1177 in f4f3a89
ikcp_flushis called only if the current timepoint is greater or equal tots_flush, which makesikcp_checkpointless.