void OnNewClient(IAsyncResult _asyncResult)
        {
            System.Net.Sockets.Socket ClientSocket = ListenSocket.EndAccept(_asyncResult);
            ListenSocket.BeginAccept(OnNewClient, null);

            var NewClient = new TelnetClient { Socket = ClientSocket };
            ClientSocket.BeginReceive(NewClient.Storage, 0, 1024, System.Net.Sockets.SocketFlags.Partial, OnData, NewClient);
            Console.WriteLine("New standard client: " + ClientSocket.RemoteEndPoint.ToString());
            Mud.ClientConnected(NewClient);
        }
Example #2
0
        void OnNewClient(IAsyncResult _asyncResult)
        {
            System.Net.Sockets.Socket ClientSocket = ListenSocket.EndAccept(_asyncResult);
            ListenSocket.BeginAccept(OnNewClient, null);

            var NewClient = new TelnetClient {
                Socket = ClientSocket
            };

            ClientSocket.BeginReceive(NewClient.Storage, 0, 1024, System.Net.Sockets.SocketFlags.Partial, OnData, NewClient);
            Console.WriteLine("New standard client: " + ClientSocket.RemoteEndPoint.ToString());
            Mud.ClientConnected(NewClient);
        }