Ejemplo n.º 1
0
        public void ReceiveCallback(IAsyncResult AsyncCall)
        {
            ASCIIEncoding encoding = new ASCIIEncoding();

            Byte[] message = encoding.GetBytes("You connected to server");

            client = (Socket)AsyncCall.AsyncState;
            client = client.EndAccept(AsyncCall);

            client.Send(message);

            T4SL        = new Thread4ServerListener(RunListenPort);
            _myThreads1 = new Threads2(T4SL);
            _myThreads1.RunServerThreads();
            Control.CheckForIllegalCrossThreadCalls = false;
        }
Ejemplo n.º 2
0
 public Threads2(Thread4ServerListener T4SL)
 {
     _T4SL = T4SL;
 }