[ENet-discuss] keeping connection alive while stopped in debugger

Ruud van Gaal ruud at racer.nl
Tue May 1 01:51:27 PDT 2012


It does affect things a bit too hardcoded for my taste; with all the
versions sofar, I've made these parameters modifiable.

- in enet.h, add these:

extern int ENetPeerTimeOutMinimum;
extern int ENetPeerTimeOutMaximum;

#define ENET_PEER_TIMEOUT_MINIMUM ENetPeerTimeOutMinimum
#define ENET_PEER_TIMEOUT_MAXIMUM ENetPeerTimeOutMaximum

- in the enum where all these parameters are defined, comment the original
ones out:

   //ENET_PEER_TIMEOUT_MINIMUM              = 5000,
   //ENET_PEER_TIMEOUT_MAXIMUM              = 30000,

- in callbacks.c, add these:

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

Then just modify these variables depending on your debug state, if desired.
This makes it possible to tweak these (important) parameters per app.

Cheers,
Ruud

On Mon, Apr 30, 2012 at 10:44 PM, Grant Mills <
Grant_Mills at affirmednetworks.com> wrote:

>  Hi James
>
>  in the include/enet/enet.h file. Increase the ENET_PEER_TIMEOUT_MINIMUM.
> It will be a value like "5000". This is 5 seconds. The upper bound
> (ENET_PEER_TIMEOUT_MAXIMUM) is around 30000. I would just boost both to
> 300000 then rebuild the enet libraries.
>
>  /grant
>
>
>   On Apr 30, 2012, at 4:20 PM, James B wrote:
>
>  Is there anyway to increase timeouts so that when I am debugging my game
> (and stopped program execution in the debugger), enet does not drop the
> connection?  I would like to increase timeouts to 1-5 minutes if possible.
>
> James
>  _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss
>
>
>
> ---
>      *Bug in my software
> Disappears when in testing
> Curse you, Heisenberg*
>
>
>  grant_mills at affirmednetworks.com
>
>
>
>
>
> _______________________________________________
> 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/20120501/e5340caa/attachment.html>


More information about the ENet-discuss mailing list