//-------------------------------------------------------------------------------------------- public virtual void OnConnected(SocketClient socketclient) { }
//------------------------------------------------------------------------------------------- public virtual void OnAccept(Object pSock) { Socket socket = (Socket) pSock; SocketClient client = new SocketClient(socket); try { connections.Add(client); } catch (Exception e) { DebugOut("Unknown error:\r\n\r\n" + e.ToString(), true); if (client != null) { client.Disconnect(); } try { client = null; } catch { } } }