[ENet-discuss] Multi-threading ENet the easy way...

Blair Holloway thynameisblair at chaosandcode.com
Sun Feb 7 14:30:04 PST 2010


On Fri, Feb 5, 2010 at 7:14 PM, Syed Setia Pernama <syedhs at yahoo.com> wrote:

> I am using Intel VTune profiler and the hits ~20% was in the function
> enet_protocol_dispatch_incoming_commands.
> I think the reason why enet is taking much of the processing time because
> first
>

To get the obvious out of the way: are your sockets set to non-blocking? If
they aren't, try that first and see if performance improves.

Since most of your time appears to be spent receiving, having each client
connected to a separate Enet host, and processing that host in a separate
thread, seems beneficial.

Since every Enet host will want to listen to a separate socket, will you be
setting aside a separate Enet host for clients to connect to, that will tell
the clients the port number of the actual host they should connect to? Or do
you have some other method of 'jumping' the clients over to a new host?

- Blair
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20100208/dad5d822/attachment.htm>


More information about the ENet-discuss mailing list