13 changes: 7 additions & 6 deletions 13 ikcp.c Original file line numberDiff line numberDiff line change @@ -470,7 +470,7 @@ int ikcp_send(ikcpcb *kcp, const char *buffer, int len) { IKCPSEG *seg; int count, i; int append = 0;...
kcp = ikcp_create(0x11223344, (__bridge void *)(self)); // 而考虑到丢包重发,设置最大收发窗口为128 ikcp_wndsize(kcp, 128, 128); kcp->output = udp_output; ikcp_nodelay(kcp, 1, 10, 2, 1); kcp->rx_minrto = 10; kcp->fastresend = 1; int udp_output(const char
把接收到的数据ikcp_input输入到kcp层,并且调用ikcp_update,这样客户端才会返回ack包给服务器
After ikcp_send. and once we receive data in ikcp_recv we dont want kcp to sent ACK back ...
After ikcp_send. and once we receive data in ikcp_recv we dont want kcp to sent ACK back ...
有一点困惑的点在于调用了ikcp_send之后,消息不会立刻被发出去,而是需要手动调用一次ikcp_update才会...