Exemple #1
0
        static void Main(string[] args)
        {
            server = new eServer(666, 667);
            server.OnClientConnected += Server_OnClientConnected;
            server.OnClientDisconnected += Server_OnClientDisconnected;
            server.OnRequestReceived += Server_OnRequestReceived;

            dbmanager = new DatabaseManager("db/database.db");

            server.Start();

            Log("Server started, waiting for clients ...");

            string command;

            while (true)
            {
                command = Console.ReadLine().Trim();
                if (command.Equals("/exit"))
                    break;

            }

            server.Stop();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            server = new eServer(666);
            server.OnClientConnected += Server_OnClientConnected;
            server.OnClientDisconnected += Server_OnClientDisconnected;
            server.OnDataReceived += server_OnDataReceived;

            server.Start();

            string command;

            while(true)
            {
                command = Console.ReadLine().Trim();
                if(command.Equals("/exit"))
                {
                    server.Stop();
                    Environment.Exit(0);
                }
            }
        }