[ENet-discuss] RE: disable packet throttle
Nick Hodapp
nickh at Oberon-Media.com
Wed Mar 2 12:42:25 PST 2005
Lee wrote:
>Set the decel to 0, but keep the accel non-zero. That will prevent it
>from throttling down.
Yeah, I tried that and it didn't work. The reason is the code in
enet_host_bandwidth_throttle() which recalculates the
packetThrottleLimit, and adjusts the packetThrottle downwards if the
limit shrinks:
peer -> packetThrottleLimit = (peerBandwidth *
ENET_PEER_PACKET_THROTTLE_SCALE) / peer -> outgoingDataTotal;
if (peer -> packetThrottleLimit == 0)
peer -> packetThrottleLimit = 1;
if (peer -> packetThrottle > peer -> packetThrottleLimit)
peer -> packetThrottle = peer -> packetThrottleLimit;
So, the packetThrottle drops below the max value
(ENET_PEER_PACKET_THROTTLE_SCALE, == 32) of packetThrottleCounter, and
certain packets are dropped.
Any other ideas?
Thanks,
Nick Hodapp
More information about the ENet-discuss
mailing list