public void Initialize() { _timer = new System.Timers.Timer(RecentIPsUpdateRate.TotalMilliseconds); _timer.Elapsed += OnTimerIntervalElapsed; _recent_server_creators_IPs = new Queue <TimestampedIP>(); _tcp_listener = new TcpListener(Socket); DbServer = new DatabaseServer(); AuthServer = new AuthenticationServer.AuthenticationServer(_tcp_listener, DbServer); DbServer.Initialize(); _registered_servers = DbServer.SelectActiveGameServers(); AuthServer.Initialize(); _thread_mre = new ManualResetEvent(false); _main_mre = new ManualResetEvent(false); _network_handling_thread = new Thread(ServerLoop); _network_handling_thread.IsBackground = false; Status = ServerStatus.Initialized; OnInitialization?.Invoke(this, null); }
public AuthenticationConnectionProcessor(TcpClient tcp_client, AuthenticationServer.AuthenticationServer auth) { _client = tcp_client; _auth = auth; }