protected override void ProcessAccept(GamespyTcpStream Stream)
{
// Get our connection id
int ConID = Interlocked.Increment(ref ConnectionCounter);
GpcmClient client;
try
{
// Create a new GpcmClient, passing the IO object for the TcpClientStream
client = new GpcmClient(Stream, ConID);
Processing.TryAdd(ConID, client);
// Begin the asynchronous login process
client.SendServerChallenge();
}
catch (Exception e)
{
// Log the error
Program.ErrorLog.Write("WARNING: An Error occured at [GpcmServer.ProcessAccept] : Generating Exception Log");
ExceptionHandler.GenerateExceptionLog(e);
// Remove pending connection
Processing.TryRemove(ConID, out client);
// Release this stream so it can be used again
base.Release(Stream);
}
}