<div class="gmail_quote">On Fri, Feb 5, 2010 at 7:14 PM, Syed Setia Pernama <span dir="ltr">&lt;<a href="mailto:syedhs@yahoo.com" target="_blank">syedhs@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div style="font-family:verdana,helvetica,sans-serif;font-size:10pt">I am using Intel VTune profiler and the hits ~20% was in the function enet_protocol_dispatch_incoming_commands.<br><div>I think the reason why enet is taking much of the processing time because first<br>

</div></div></div></blockquote><div><br></div><div>To get the obvious out of the way: are your sockets set to non-blocking? If they aren&#39;t, try that first and see if performance improves.</div><div><br></div><div>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.</div>

<div><br></div><div>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 &#39;jumping&#39; the clients over to a new host?</div>
<div><br></div><div>- Blair</div></div>