ChatterBox.Server.ChatterBoxServer.HandleNewConnection C# (CSharp) Method

HandleNewConnection() private method

private HandleNewConnection ( TcpClient tcpClient ) : void
tcpClient System.Net.Sockets.TcpClient
return void
        private void HandleNewConnection(TcpClient tcpClient)
        {
            Task.Run(() =>
            {
                var connection = new UnregisteredConnection(tcpClient);
                Logger.Info($"{connection} connected.");
                connection.OnRegister += UnregisteredConnection_OnRegister;
                UnregisteredConnections.GetOrAdd(connection.Id, connection);
                connection.WaitForRegistration();
            });
        }