Beispiel #1
0
        static void Main(string[] args)
        {
            //This must be the first line!!
            ServerConfigManager.LoadMyConfigs();

            port = (int)ServerConfigManager.MyConfigs["port"];

            Process.GetCurrentProcess().Exited += Program_Exited;

            Console.WriteLine((string)ServerConfigManager.MyConfigs["ServerName"]);


            serverDB  = new ServerDB();
            serverCmd = new ServerCmd(serverDB);


            listener = new Listener(port);
            listener.SocketAccepted += new EventHandler <SocketAcceptedEventHandler>(listener_SocketAccepted);
            listener.Start();
            clients = new List <Client>();


            //Schließe das Programm nicht
            System.Diagnostics.Process.GetCurrentProcess().WaitForExit();
        }
        static void Main(string[] args)
        {
            //This must be the first line!!
            ServerConfigManager.LoadMyConfigs();

            port = (int)ServerConfigManager.MyConfigs["port"];

            Process.GetCurrentProcess().Exited += Program_Exited;

            Console.WriteLine((string)ServerConfigManager.MyConfigs["ServerName"]);

            serverDB = new ServerDB();
            serverCmd = new ServerCmd(serverDB);

            listener = new Listener(port);
            listener.SocketAccepted += new EventHandler<SocketAcceptedEventHandler>(listener_SocketAccepted);
            listener.Start();
            clients = new List<Client>();

            //Schließe das Programm nicht
            System.Diagnostics.Process.GetCurrentProcess().WaitForExit();
        }
Beispiel #3
0
 public ServerCmd(ServerDB _currServerDB)
 {
     this.CurrServerDB = _currServerDB;
 }
 public ServerCmd(ServerDB _currServerDB)
 {
     this.CurrServerDB = _currServerDB;
 }