mirror of
https://github.com/lsalzman/enet
synced 2024-11-21 14:29:05 -07:00
reliable packet throttle tweak
This commit is contained in:
parent
2a878c2372
commit
1e18fd6001
1 changed files with 3 additions and 1 deletions
|
@ -1291,7 +1291,9 @@ enet_protocol_send_reliable_outgoing_commands (ENetHost * host, ENetPeer * peer)
|
|||
|
||||
if (outgoingCommand -> packet != NULL)
|
||||
{
|
||||
if (peer -> reliableDataInTransit + outgoingCommand -> fragmentLength > peer -> windowSize)
|
||||
enet_uint32 windowSize = (peer -> packetThrottle * peer -> windowSize) / ENET_PEER_PACKET_THROTTLE_SCALE;
|
||||
|
||||
if (peer -> reliableDataInTransit + outgoingCommand -> fragmentLength > ENET_MAX (windowSize, peer -> mtu))
|
||||
break;
|
||||
|
||||
if ((enet_uint16) (peer -> mtu - host -> packetSize) < (enet_uint16) (commandSize + outgoingCommand -> fragmentLength))
|
||||
|
|
Loading…
Reference in a new issue