Example #1
0
        public override async Task OnConnectedAsync(ConnectionContext connection)
        {
            if (!VerifySocket(connection))
            {
                Release(connection);
                return;
            }

            var ns = new NetState(connection);

            TcpServer.Instances.Add(ns);
            Console.WriteLine($"Client: {ns}: Connected. [{TcpServer.Instances.Count} Online]");

            await ns.ProcessIncoming(_messagePumpService).ConfigureAwait(false);
        }