Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            IPAddress ipAddress = IPAddress.Any;
            TcpListener tcpListener = new TcpListener(ipAddress, 13000);
            tcpListener.Start();

            bool done = false;
            while (!done)
            {
                TcpClient tcpClient = tcpListener.AcceptTcpClient();
                MyClient newClient = new MyClient(tcpClient);
                Thread t = new Thread(new ThreadStart(newClient.Communicate));
                t.Start();
            }
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            IPAddress   ipAddress   = IPAddress.Any;
            TcpListener tcpListener = new TcpListener(ipAddress, 13000);

            tcpListener.Start();

            bool done = false;

            while (!done)
            {
                TcpClient tcpClient = tcpListener.AcceptTcpClient();
                MyClient  newClient = new MyClient(tcpClient);
                Thread    t         = new Thread(new ThreadStart(newClient.Communicate));
                t.Start();
            }
        }