public void Start()
        {
            ReceiverSettings receiverSettings = new ReceiverSettings();

            receiverSettings.LoadFromFile(SETTINGS_FILE);
            DBBackendServer dbServer = new DBBackendServer(receiverSettings);

            dbServer.Start();
            RelayServer relayServer = new RelayServer(receiverSettings, dbServer);

            relayServer.Start();
            ReporterServer reporterServer = new ReporterServer(receiverSettings, relayServer);

            reporterServer.Start();
            InteractiveConsole(relayServer, dbServer);
        }
        private void InteractiveConsole(RelayServer relayServer, DBBackendServer dbServer)
        {
            bool running = true;

            while (running)
            {
                try
                {
                    string line    = Console.ReadLine().ToLower();
                    bool   handled = false;
                    if (line == "q")
                    {
                        handled = true;
                        running = false;
                    }
                    if (line == "p")
                    {
                        handled = true;
                        relayServer.PrintTree();
                    }
                    if (line == "d")
                    {
                        handled = true;
                        dbServer.PrintClients();
                    }
                    if (!handled)
                    {
                        Console.WriteLine("Commands: q for quit, p for print server/relay tree, d for connected DB clients");
                    }
                }
                catch
                {
                    NoConsole();
                }
            }
        }
 public ReporterServer(ReceiverSettings settings, RelayServer relayServer)
 {
     this.settings    = settings;
     this.relayServer = relayServer;
 }