예제 #1
0
        public AsyncServer(IApi api, IServerNotifier notifier, Logger logger)
        {
            _connections = new Dictionary <string, ServerConnection>();

            _api                 = api;
            _requestQueue        = new RequestQueue(api);
            _requestQueue.Error += OnRequestQueueError;
            _notifier            = notifier;

            _isServerRunning = false;
            _logger          = logger;
        }
예제 #2
0
        public AsyncServer(X509Certificate2 certificate, IApi api, IServerNotifier notifier, Logger logger)
        {
            _connections = new Dictionary <UserId, ServerConnection>();

            _certificate         = certificate;
            _api                 = api;
            _requestQueue        = new RequestQueue(api);
            _requestQueue.Error += OnRequestQueueError;
            _notifier            = notifier;
            _bans                = new ServerBans(this);

            _isServerRunning = false;
            _logger          = logger;
        }