[ENet-discuss] ENet scalability benchmark data

Samuel Lacroix samy.rolka at laposte.net
Tue Mar 4 15:26:21 PST 2008


Hi, I'm new to ENet, and I was wondering how can enet_host_check_events 
be used efficiently on the server code. Google has not helped me at all. 
What is its purpose ? Currently, I "send" packets first, then I use a 
enet_host_service to actually send them and receive client packets. So, 
if I receive someone's chat text, it will be sent to toher clients at 
the next tick. Is it bad ? If it is, how can enet_host_check_events 
improve this ? Thanks a LOT.

Lee Salzman wrote :
> Note that those sorts of benchmarks are somewhat artificial, in that they
> go against the grain of ENet's design.
>
> Servicing ENet 1,000 times a second is going to eat up a bunch
> of processing time just doing user -> kernel -> user transitions for
> normal system calls, regardless. The enet_host_check_events() function
> was introduced in 1.2 to combat this by ensuring you never transition
> into the kernel when all you want is just to eat up the current batch of
> packets.


More information about the ENet-discuss mailing list