public WebsocketServer(AsyncTCPListener listener) { mSubProtocols = new List<IWebsocketSubprotocol>(); mClients = new Dictionary<string, WebClient>(); mHandShaker = new WebsocketImplS.HandShaker(); mDataParse = new WebsocketImplS.DataParser(); mSendTokenIds = new List<int>(); mTcpListener = listener; mTcpListener.AddHandler(this); }
//public void start() //{ // mTokenIds = new List<int>(); // mListener = new AsyncTCPListener(new WebListenerConfig() // { // Port=8008, // MaxBufferSize=10*1024*1024, // MaxConnection=10000, // BackLog=100 // }); // mListener.AddHandler(this); // mListener.Start(); //} public WebListenerTester(AsyncTCPListener listener) { mTokenIds = new List<int>(); mListener = listener; mListener.AddHandler(this); }