新增ikcp_setoutput函数

This commit is contained in:
U2FsdGVkX1
2016-09-10 20:02:36 +08:00
parent 8813e65158
commit abf9ce1464
2 changed files with 10 additions and 0 deletions

7
ikcp.c
View File

@@ -292,6 +292,13 @@ ikcpcb* ikcp_create(IUINT32 conv, void *user)
return kcp;
}
//---------------------------------------------------------------------
// set output function
//---------------------------------------------------------------------
void ikcp_setoutput(ikcpcb *kcp, int (*output)(const char *buf, int len, ikcpcb *kcp, void *user))
{
kcp->output = output;
}
//---------------------------------------------------------------------
// release a new kcpcb