Sending a lot of little ENet packets (10-20 bytes) is going to consume a lot more than that per packet in terms of internal ENet protocol headers. To save on header overhead, you should batch stuff together into one bigger packet on your end, especially if it is reliable. If it is unreliable, you should still batch, but make sure you're not going over the MTU, and if so, either using unreliable fragment, or making sure to split stuff up so to not accidentally get packets marked reliable that you don't want.<br>
<br><div class="gmail_quote">On Tue, Oct 2, 2012 at 4:20 PM, Lucas Beyer <span dir="ltr"><<a href="mailto:pompei2@gmail.com" target="_blank">pompei2@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
My gameserver runs in ticks (0.1-0.01s). Each tick, events happen,<br>
which need to be reliably sent to the clients.<br>
<br>
Is it better to<br>
a) each tick, send one big message containing all events which<br>
happened during the tick or<br>
b) send each event (~10-20 bytes) as a separate message during the tick?<br>
<br>
As I understood, messages are only really sent through the wire during<br>
a call to enet_host_service, right? I call this between two ticks, so<br>
in both cases a) and b) would send the message(s) at the end of the<br>
tick.<br>
<br>
I know the best answer is "implement both then measure" but I was<br>
wondering if, in enet and considering they all need to be reliable<br>
messages, there are reasons why one might be inherently better than<br>
the other. "big" is around 10-20 kilobytes.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Best regards, Lucas<br>
<a href="http://arkana-fts.org" target="_blank">http://arkana-fts.org</a><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>
</font></span></blockquote></div><br>