I have an online gaming server and I have 600 online users, but the cpu is a bit high (using 10 ~ 20% of 26GHz) and the profiler says that this line is using many features
Socket.BeginSend(packet, 0, packet.Length, 0, OnSendCompleted, null);
Callback code:
private void OnSendCompleted(IAsyncResult async)
{
try
{
if (Socket != null && Socket.Connected && _connected)
Socket.EndSend(async);
else
Disconnect();
}
catch (Exception exception)
{
HandleDisconnect(exception);
}
}