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); }
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); }