[ENet-discuss] 1.3.1 release preparation?

Ruud van Gaal ruud at racer.nl
Wed Feb 9 02:54:25 PST 2011


The only real thing I've always modified is the timeout, which is different
in my apps (normal is around 30 sec timeout, but one of my main apps can
take a bit longer, loading a large scene, possibly taking >30 sec). So I
made the timeout modifiable:

- in callbacks.cpp, I added (the default is a bit large, should be 30*1000
for general use):

int ENetPeerTimeOutMinimum=5*60000;
int ENetPeerTimeOutMaximum=5*60000;

Then in enet.h I took out the hardcoded number and replaced it with a
reference to the parameters above:

---
// RvG: dynamic settings (see callbacks.cpp)
extern int ENetPeerTimeOutMinimum;
extern int ENetPeerTimeOutMaximum;

#define ENET_PEER_TIMEOUT_MINIMUM ENetPeerTimeOutMinimum
#define ENET_PEER_TIMEOUT_MAXIMUM ENetPeerTimeOutMaximum

enum
{
   ENET_HOST_RECEIVE_BUFFER_SIZE          = 256 * 1024,
   ENET_HOST_SEND_BUFFER_SIZE             = 256 * 1024,
   ENET_HOST_BANDWIDTH_THROTTLE_INTERVAL  = 1000,
   ENET_HOST_DEFAULT_MTU                  = 1400,

   ENET_PEER_DEFAULT_ROUND_TRIP_TIME      = 500,
   ENET_PEER_DEFAULT_PACKET_THROTTLE      = 32,
   ENET_PEER_PACKET_THROTTLE_SCALE        = 32,
   ENET_PEER_PACKET_THROTTLE_COUNTER      = 7,
   ENET_PEER_PACKET_THROTTLE_ACCELERATION = 2,
   ENET_PEER_PACKET_THROTTLE_DECELERATION = 2,
   ENET_PEER_PACKET_THROTTLE_INTERVAL     = 5000,
   ENET_PEER_PACKET_LOSS_SCALE            = (1 << 16),
   ENET_PEER_PACKET_LOSS_INTERVAL         = 10000,
   ENET_PEER_WINDOW_SIZE_SCALE            = 64 * 1024,
   ENET_PEER_TIMEOUT_LIMIT                = 32,
   //ENET_PEER_TIMEOUT_MINIMUM              = 5000,
   //ENET_PEER_TIMEOUT_MAXIMUM              = 30000,
   ENET_PEER_PING_INTERVAL                = 500,
   ENET_PEER_UNSEQUENCED_WINDOWS          = 64,
   ENET_PEER_UNSEQUENCED_WINDOW_SIZE      = 1024,
   ENET_PEER_FREE_UNSEQUENCED_WINDOWS     = 32,
   ENET_PEER_RELIABLE_WINDOWS             = 16,
   ENET_PEER_RELIABLE_WINDOW_SIZE         = 0x1000,
   ENET_PEER_FREE_RELIABLE_WINDOWS        = 8
};
---

Perhaps it's useful enough for inclusion in v1.3.1; it doesn't require
changes in the user code, but adds the option of setting ENetPeerTimeOut* to
something other than the default.

Cheers,
Ruud

On Wed, Feb 9, 2011 at 3:09 AM, Lee Salzman <lsalzman at gmail.com> wrote:

> So, I am probably going to roll out a 1.3.1 release soon. The main change
> in it would simply be the reliable packet throttling idea that I had thought
> of earlier, as well as some bug fixes discovered in the testing of it (which
> also merit a 1.2.4). Are there any other small things people would like that
> are applicable for a sub-point release? Please no pie-in-the-sky requests,
> this is just a 0.0.1 version increment. :)
>
> Lee
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20110209/c4166bc7/attachment.html>


More information about the ENet-discuss mailing list