mirror of
https://github.com/skywind3000/kcp.git
synced 2025-03-22 07:22:59 +08:00
Cleanup
This commit is contained in:
parent
d6829263fe
commit
c5a17fb8b5
7
ikcp.c
7
ikcp.c
@ -296,7 +296,7 @@ ikcpcb* ikcp_create(IUINT32 conv, void *user)
|
|||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
// release a new kcpcb
|
// release a kcpcb
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
void ikcp_release(ikcpcb *kcp)
|
void ikcp_release(ikcpcb *kcp)
|
||||||
{
|
{
|
||||||
@ -1175,7 +1175,7 @@ void ikcp_update(ikcpcb *kcp, IUINT32 current)
|
|||||||
// Determine when should you invoke ikcp_update:
|
// Determine when should you invoke ikcp_update:
|
||||||
// returns when you should invoke ikcp_update in millisec, if there
|
// returns when you should invoke ikcp_update in millisec, if there
|
||||||
// is no ikcp_input/_send calling. you can call ikcp_update in that
|
// is no ikcp_input/_send calling. you can call ikcp_update in that
|
||||||
// time, instead of call update repeatly.
|
// time, instead of call update repeatedly.
|
||||||
// Important to reduce unnacessary ikcp_update invoking. use it to
|
// Important to reduce unnacessary ikcp_update invoking. use it to
|
||||||
// schedule ikcp_update (eg. implementing an epoll-like mechanism,
|
// schedule ikcp_update (eg. implementing an epoll-like mechanism,
|
||||||
// or optimize ikcp_update when handling massive kcp connections)
|
// or optimize ikcp_update when handling massive kcp connections)
|
||||||
@ -1218,8 +1218,6 @@ IUINT32 ikcp_check(const ikcpcb *kcp, IUINT32 current)
|
|||||||
return current + minimal;
|
return current + minimal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int ikcp_setmtu(ikcpcb *kcp, int mtu)
|
int ikcp_setmtu(ikcpcb *kcp, int mtu)
|
||||||
{
|
{
|
||||||
char *buffer;
|
char *buffer;
|
||||||
@ -1268,7 +1266,6 @@ int ikcp_nodelay(ikcpcb *kcp, int nodelay, int interval, int resend, int nc)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int ikcp_wndsize(ikcpcb *kcp, int sndwnd, int rcvwnd)
|
int ikcp_wndsize(ikcpcb *kcp, int sndwnd, int rcvwnd)
|
||||||
{
|
{
|
||||||
if (kcp) {
|
if (kcp) {
|
||||||
|
Loading…
Reference in New Issue
Block a user