Could you expand the documentation (doxygen) to include some comments on the timeouts?<br>I wasn't aware of them until during my unit testing one of my peers kept disconnecting.<br>An option to turn them off might be a useful addition as well.<br>
<br><br><div class="gmail_quote">On Wed, Feb 9, 2011 at 4:54 AM, Ruud van Gaal <span dir="ltr"><<a href="mailto:ruud@racer.nl">ruud@racer.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
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:<br>
<br>- in callbacks.cpp, I added (the default is a bit large, should be 30*1000 for general use):<br><br>int ENetPeerTimeOutMinimum=5*60000;<br>int ENetPeerTimeOutMaximum=5*60000;<br><br>Then in enet.h I took out the hardcoded number and replaced it with a reference to the parameters above:<br>
<br>---<br>// RvG: dynamic settings (see callbacks.cpp)<br>extern int ENetPeerTimeOutMinimum;<br>extern int ENetPeerTimeOutMaximum;<br><br>#define ENET_PEER_TIMEOUT_MINIMUM ENetPeerTimeOutMinimum<br>#define ENET_PEER_TIMEOUT_MAXIMUM ENetPeerTimeOutMaximum<br>
<br>enum<br>{<br> ENET_HOST_RECEIVE_BUFFER_SIZE = 256 * 1024,<br> ENET_HOST_SEND_BUFFER_SIZE = 256 * 1024,<br> ENET_HOST_BANDWIDTH_THROTTLE_INTERVAL = 1000,<br> ENET_HOST_DEFAULT_MTU = 1400,<br>
<br> ENET_PEER_DEFAULT_ROUND_TRIP_TIME = 500,<br> ENET_PEER_DEFAULT_PACKET_THROTTLE = 32,<br> ENET_PEER_PACKET_THROTTLE_SCALE = 32,<br> ENET_PEER_PACKET_THROTTLE_COUNTER = 7, <br> ENET_PEER_PACKET_THROTTLE_ACCELERATION = 2,<br>
ENET_PEER_PACKET_THROTTLE_DECELERATION = 2,<br> ENET_PEER_PACKET_THROTTLE_INTERVAL = 5000,<br> ENET_PEER_PACKET_LOSS_SCALE = (1 << 16),<br> ENET_PEER_PACKET_LOSS_INTERVAL = 10000,<br>
ENET_PEER_WINDOW_SIZE_SCALE = 64 * 1024,<br> ENET_PEER_TIMEOUT_LIMIT = 32,<br> //ENET_PEER_TIMEOUT_MINIMUM = 5000,<br> //ENET_PEER_TIMEOUT_MAXIMUM = 30000,<br>
ENET_PEER_PING_INTERVAL = 500,<br>
ENET_PEER_UNSEQUENCED_WINDOWS = 64,<br> ENET_PEER_UNSEQUENCED_WINDOW_SIZE = 1024,<br> ENET_PEER_FREE_UNSEQUENCED_WINDOWS = 32,<br> ENET_PEER_RELIABLE_WINDOWS = 16,<br> ENET_PEER_RELIABLE_WINDOW_SIZE = 0x1000,<br>
ENET_PEER_FREE_RELIABLE_WINDOWS = 8<br>};<br>---<br><br>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.<br>
<br>Cheers,<br><font color="#888888">Ruud</font><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Wed, Feb 9, 2011 at 3:09 AM, Lee Salzman <span dir="ltr"><<a href="mailto:lsalzman@gmail.com" target="_blank">lsalzman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
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. :)<br>
<br>
Lee<br>
_______________________________________________<br>
ENet-discuss mailing list<br>
<a href="mailto:ENet-discuss@cubik.org" target="_blank">ENet-discuss@cubik.org</a><br>
<a href="http://lists.cubik.org/mailman/listinfo/enet-discuss" target="_blank">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br>
</blockquote></div><br>
</div></div><br>_______________________________________________<br>
ENet-discuss mailing list<br>
<a href="mailto:ENet-discuss@cubik.org">ENet-discuss@cubik.org</a><br>
<a href="http://lists.cubik.org/mailman/listinfo/enet-discuss" target="_blank">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>---<br>"The great thing about Object Oriented code is that it can make small,
simple problems look like large, complex ones."<br>