C# Null Sockets
When the socket is null, it lags everyone which is connected and I'm
wondering what could be the cause of this, the affected code is below.
public void SendData(byte[] Data)
{
try
{
if (Stopped)
{
return;
}
if (mSocket != null)
{
Output.WriteLine("[SND][" + mId + "]: " +
Constants.DefaultEncoding.GetString(Data),
OutputLevel.DebugInformation);
mSocket.BeginSend(Data, 0, Data.Length, SocketFlags.None,
new AsyncCallback(OnDataSent), null);
}
else
{
using (SqlDatabaseClient MySqlClient =
SqlDatabaseManager.GetClient())
{
Stop(MySqlClient);
}
}
}
catch (Exception e)
{
//SOCKETISNULL
}
}
No comments:
Post a Comment