public EzServer(EzServerSettings settings) { Settings = settings; LogProvider <EzLogger> .Provider.Configure(Settings); _logger = LogProvider <EzLogger> .GetLogger(this); _handlers = new Dictionary <int, IHandler>(); _server = new AsyncEventServer(Settings.ListenIpAddress, Settings.Port, this, Settings.ServerSettings); Clients = new ClientLookup(); Database = new SQLiteDb(settings.DatabaseSettings.SQLitePath); SessionManager = new SessionManager(); }
protected override void Configure(object configuration) { EzServerSettings serverConfig = configuration as EzServerSettings; if (serverConfig != null) { _logUnknownIncomingPackets = serverConfig.LogUnknownIncomingPackets; _logOutgoingPackets = serverConfig.LogOutgoingPackets; _logIncomingPackets = serverConfig.LogIncomingPackets; } base.Configure(configuration); }