public static Connector getInstance() { if (instance == null) instance = new Connector(); return instance; }
public SessionManager(Connector connector) { this.connector = connector; this.sessions = new Dictionary<int, Session>(); this.loggedInUsers = new List<int>(); this.loginAttemps = new Dictionary<string, int>(); this.blockedIPs = new Dictionary<string, DateTime>(); }
public SecuredWebserver(SettingsReader Settings) : base(Settings) { this.Settings = Settings; activeIPs = new Dictionary<string, int>(); connector = Connector.getInstance(); sessions = new SessionManager(connector); logger = Logger.getInstance(); listener = new TcpListener(IPAddress.Parse("127.0.0.1"), Settings.AdminPort); //certificate = new X509Certificate2(cerficicate_name, "ChrisLuke"); }