[ENet-discuss] ENet 1.3.1/1.2.3 released

Lee Salzman lsalzman at gmail.com
Thu Feb 10 05:04:17 PST 2011


I haven't changed anything about how that worked in this version, but 
rather your usage of it was never safe in the first place. You can't 
really do that using peer->incomingDataTotal because it resets regularly 
and not in any way the user can predict. It is for internal purposes 
only, really. You're better off just counting the total amount of packet 
data you receive on the peer and just throwing on a per-packet 
fudge-factor to account for header sizes in some vague way.

On 02/10/2011 09:00 PM, Jay Sprenkle wrote:
>
> I've just finished running through my regression tests with the new 
> version.
> I'm currently looking at ENetPeer.incomingDataTotal to calculate the 
> throughput on a connection.
> I get a timestamp when I get a connection event and calculate using 
> TotalBytes delivered / connection age.
> I  thought this was pretty safe but this seems to be working 
> differently now.
> Can you suggest an alternative?
>
> Thanks,
>
> Jay
>
>



More information about the ENet-discuss mailing list