Exemplo n.º 1
0
        public void Start()
        {
            int t_serverPort = 4444;
            AsynchronousSocketListener ASL = new AsynchronousSocketListener(t_serverPort);

            ASL.SetUpDelegateAcc(DummyDelegateAccept);
            ASL.SetUpDelegateRec(DummyDelegateReceive);
            oThread = new Thread(new ThreadStart(ASL.StartListening));
            oThread.Start();
        }
Exemplo n.º 2
0
 //You need to store the listener and handler.  You will need the handler socket to identify which client you're receiving messages from.
 public int DummyDelegateAccept(AsynchronousSocketListener p_asl, Socket p_listener, Socket p_handler)
 {
     Console.WriteLine("Recieved client request " + p_handler.RemoteEndPoint.ToString());
     return(0);
 }