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

                PopulateBanList();

                _serverListener = new TCPVoiceRouter(_connectedClients, _eventAggregator);
                var voipListenerThread = new Thread(_serverListener.StartListening);
                voipListenerThread.Start();

                _serverSync = new ServerSync(_connectedClients, _bannedIps, _eventAggregator);
                var serverSyncThread = new Thread(_serverSync.StartListening);
                serverSyncThread.Start();
            }
        }