コード例 #1
0
		public void AcceptCallback(IAsyncResult ar) {
			Console.WriteLine ("Accepting Client");
			Socket listener = (Socket)ar.AsyncState;
			Socket client = listener.EndAccept (ar);
			listener.BeginAccept (new AsyncCallback (this.AcceptCallback), listener);
			WebsocketClient c = new WebsocketClient (client);
			clients.Add (c);
		}
コード例 #2
0
        public void AcceptCallback(IAsyncResult ar)
        {
            Console.WriteLine("Accepting Client");
            Socket listener = (Socket)ar.AsyncState;
            Socket client   = listener.EndAccept(ar);

            listener.BeginAccept(new AsyncCallback(this.AcceptCallback), listener);
            WebsocketClient c = new WebsocketClient(client);

            clients.Add(c);
        }