No you won't break anything. The remark is just a warning about if you don't set them back to zero then your delta will become inaccurate.
On Tue, Oct 16, 2012 at 2:31 PM, Sebastian Ahlman <[email protected]> wrote: > In my engine I want to track the bytes sent and received over the network. > To do this I have the methods void addBytesSent(unsigned int bytes) and void > addBytesReceived(unsigned int bytes). This should be all data, including > enet headers, not only the payload. I found the members totalSentData and > totalReceivedData of ENetHost. These both have a remark "User should reset > to 0 as needed to prevent overflow." > > Does this mean that I can track the stats like this?: Every update in my > engine check if totalSentData and totalReceivedData are larger than zero and > if they are I call my functions with the values and set totalSentData and > totalReceivedData back to zero? This should give me the delta in sent > receiving bytes, right? Or do I break anything if I set them back to zero? > > Also, if the above is correct, are there any other data members in enet that > I should reset to zero every now and then? > > Thanks, > Sebastian Ahlman > > _______________________________________________ > ENet-discuss mailing list > [email protected] > http://lists.cubik.org/mailman/listinfo/enet-discuss > _______________________________________________ ENet-discuss mailing list [email protected] http://lists.cubik.org/mailman/listinfo/enet-discuss
