예제 #1
0
        public threadedServer()
        {
            client = new TcpListener(IPAddress.Any, 7777);
            client.Start();
            Console.WriteLine("PSUnity Server by Micky Balladelli");

            Console.WriteLine("Waiting for clients...");

            while (true)
            {
                while (!client.Pending())
                {
                    Thread.Sleep(1000);
                }
                ConnectionThread newconnection = new ConnectionThread();
                newconnection.threadListner = this.client;
                Thread newthread = new Thread(new ThreadStart(newconnection.HandleConnection));
                newthread.Start();
            }
        }
예제 #2
0
파일: Program.cs 프로젝트: taheito/PSUnity
        public threadedServer()
        {
            client = new TcpListener(IPAddress.Any, 7777);
            client.Start();
            Console.WriteLine("PSUnity Server by Micky Balladelli");

            Console.WriteLine("Waiting for clients...");

            while (true)
            {
                while (!client.Pending())
                {
                    Thread.Sleep(1000);
                }
                ConnectionThread newconnection = new ConnectionThread();
                newconnection.threadListner = this.client;
                Thread newthread = new Thread(new ThreadStart(newconnection.HandleConnection));
                newthread.Start();
            }
        }