[ENet-discuss] RE: disable packet throttle
Lee Salzman
lsalzman1 at cox.net
Wed Mar 2 20:09:08 PST 2005
That code will never get invoked at all if you pass in 0 for the bandwidths.
Nick Hodapp wrote:
>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
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>ENet-discuss mailing list
>ENet-discuss at cubik.org
>http://lists.cubik.org/mailman/listinfo/enet-discuss
>
>
More information about the ENet-discuss
mailing list