コード例 #1
0
ファイル: Program.cs プロジェクト: EdgeKiller/eNetwork2
        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();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: EdgeKiller/eNetwork2
        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);
                }
            }
        }