BF2Statistics.Gamespy.GpspServer.ProcessAccept C# (CSharp) Method

ProcessAccept() protected method

When a new connection is established, we the parent class are responsible for handling the processing
protected ProcessAccept ( GamespyTcpStream Stream ) : void
Stream BF2Statistics.Gamespy.Net.GamespyTcpStream A GamespyTcpStream object that wraps the I/O AsyncEventArgs and socket
return void
        protected override void ProcessAccept(GamespyTcpStream Stream)
        {
            try
            {
                // Convert the TcpClient to a MasterClient
                GpspClient client = new GpspClient(Stream);
                Clients.TryAdd(client.ConnectionId, client);

                // Begin accepting data now that we are fully connected
                Stream.BeginReceive();
            }
            catch (Exception e)
            {
                Program.ErrorLog.Write("WARNING: An Error occured at [Gpsp.ProcessAccept] : Generating Exception Log");
                ExceptionHandler.GenerateExceptionLog(e);
                base.Release(Stream);
            }
        }