示例#1
0
文件: Program.cs 项目: OSandh/NTTCP
        public bool Start()
        {
            Server = new NTServer();

            if (Server.Start())
            {
                IsServerOnline = true;
                return(true);
            }


            return(false);
        }
示例#2
0
文件: NTClient.cs 项目: OSandh/NTTCP
        public NTClient(NTServer server, TcpClient client, User user)
        {
            Server = server;

            Connection = client;

            User = user;
            Name = User.Name + ", " + User.Age;

            ClientThread = new Thread(ReadClient)
            {
                Name         = "ClientThread",
                IsBackground = true
            };
            ClientThread.Start();
        }