Beispiel #1
0
 public void StopServer()
 {
     if (_serverListener != null)
     {
         _stop = true;
         _serverSync.RequestStop();
         _serverSync = null;
         _serverListener.RequestStop();
         _serverListener = null;
     }
 }
Beispiel #2
0
        private void StartServer()
        {
            if (_serverListener == null)
            {
                StartExport();

                PopulateBanList();

                _serverListener = new UDPVoiceRouter(_connectedClients, _eventAggregator);
                var listenerThread = new Thread(_serverListener.Listen);
                listenerThread.Start();

                _serverSync = new ServerSync(_connectedClients, _bannedIps, _eventAggregator);
                var serverSyncThread = new Thread(_serverSync.StartListening);
                serverSyncThread.Start();
            }
        }
 public SRSClientSession(ServerSync server, ConcurrentDictionary <string, SRClient> client, HashSet <IPAddress> bannedIps) : base(server)
 {
     _clients   = client;
     _bannedIps = bannedIps;
 }