mirror of
https://github.com/skywind3000/kcp.git
synced 2025-01-14 12:40:13 +08:00
commit kcp
This commit is contained in:
parent
b3c3a19132
commit
c6d74fbdc2
4
ikcp.c
4
ikcp.c
@ -901,7 +901,7 @@ void ikcp_flush(ikcpcb *kcp)
|
|||||||
if (kcp->probe & IKCP_ASK_SEND) {
|
if (kcp->probe & IKCP_ASK_SEND) {
|
||||||
seg.cmd = IKCP_CMD_WASK;
|
seg.cmd = IKCP_CMD_WASK;
|
||||||
size = (int)(ptr - buffer);
|
size = (int)(ptr - buffer);
|
||||||
if (size + IKCP_OVERHEAD >= (int)kcp->mtu) {
|
if (size + IKCP_OVERHEAD > (int)kcp->mtu) {
|
||||||
ikcp_output(kcp, buffer, size);
|
ikcp_output(kcp, buffer, size);
|
||||||
ptr = buffer;
|
ptr = buffer;
|
||||||
}
|
}
|
||||||
@ -912,7 +912,7 @@ void ikcp_flush(ikcpcb *kcp)
|
|||||||
if (kcp->probe & IKCP_ASK_TELL) {
|
if (kcp->probe & IKCP_ASK_TELL) {
|
||||||
seg.cmd = IKCP_CMD_WINS;
|
seg.cmd = IKCP_CMD_WINS;
|
||||||
size = (int)(ptr - buffer);
|
size = (int)(ptr - buffer);
|
||||||
if (size + IKCP_OVERHEAD >= (int)kcp->mtu) {
|
if (size + IKCP_OVERHEAD > (int)kcp->mtu) {
|
||||||
ikcp_output(kcp, buffer, size);
|
ikcp_output(kcp, buffer, size);
|
||||||
ptr = buffer;
|
ptr = buffer;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user