Exemplo n.º 1
0
 public void Run()
 {
     while (true)
     {
         nbreClient++;
         Socket leSocketAcep = leSocket.Accept();
         laCom = new ClientCommunication(leSocketAcep, nbreClient, this);
         Thread _thread = new Thread(Communication);
         _thread.Start(laCom);
     }
 }
Exemplo n.º 2
0
        public void Communication(object o)
        {
            laCom = o as ClientCommunication;
            NetworkStream _Network = new NetworkStream(laCom.leSocket);

            leMessageObtenu   = new StreamReader(_Network);
            leMessageAEnvoyer = new StreamWriter(_Network);
            string ipport = laCom.leSocket.RemoteEndPoint.ToString();

            while (true)
            {
                setText("Client n. :" + nbreClient + " avec l'adresse " + ipport);
            }
        }