mirror of
https://github.com/skywind3000/kcp.git
synced 2025-01-29 18:00:26 +08:00
new comment
This commit is contained in:
parent
a6a8a790f6
commit
c5a877d2aa
10
ikcp.c
10
ikcp.c
@ -1072,6 +1072,16 @@ void ikcp_update(ikcpcb *kcp, IUINT32 current)
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// Determine when should you invoke ikcp_update:
|
||||
// if there is no ikcp_input/_send calling, you can call ikcp_update
|
||||
// after millisecs ikcp_check returns, instead of call update repeatly.
|
||||
// It is important to reduce unnacessary ikcp_update calling. you can
|
||||
// just call ikcp_update in a very small interval, or you can use it to
|
||||
// schedule ikcp_update calling (eg. when you are implementing an epoll
|
||||
// like mechanism, or optimize ikcp_update when handling massive kcp
|
||||
// connections)
|
||||
//---------------------------------------------------------------------
|
||||
IUINT32 ikcp_check(const ikcpcb *kcp, IUINT32 current)
|
||||
{
|
||||
IUINT32 ts_flush = kcp->ts_flush;
|
||||
|
4
ikcp.h
4
ikcp.h
@ -347,11 +347,11 @@ int ikcp_send(ikcpcb *kcp, const char *buffer, int len);
|
||||
void ikcp_update(ikcpcb *kcp, IUINT32 current);
|
||||
|
||||
// Determine when should you invoke ikcp_update:
|
||||
// if there is no incoming low level packet, you can invoke ikcp_update
|
||||
// if there is no ikcp_input/_send calling, you can call ikcp_update
|
||||
// after millisecs ikcp_check returns, instead of call update repeatly.
|
||||
// It is important to reduce unnacessary ikcp_update calling. you can
|
||||
// just call ikcp_update in a very small interval, or you can use it to
|
||||
// schedule ikcp_update invoking (eg. when you are implementing an epoll
|
||||
// schedule ikcp_update calling (eg. when you are implementing an epoll
|
||||
// like mechanism, or optimize ikcp_update when handling massive kcp
|
||||
// connections)
|
||||
IUINT32 ikcp_check(const ikcpcb *kcp, IUINT32 current);
|
||||
|
Loading…
Reference in New Issue
Block a user