コード例 #1
0
 static void Main(string[] args)
 {
     try
     {
         server       = new ServerObject();
         listenThread = new Thread(new ThreadStart(server.Listen));
         listenThread.Start();
     }
     catch (Exception ex)
     {
         server.Disconnect();
         Console.WriteLine(ex.Message);
     }
 }
コード例 #2
0
        static ServerObject server; // сервер

        static void Main(string[] args)
        {
            Console.WindowWidth = 80;

            try
            {
                server = new ServerObject();
                server.Listen();
            }
            catch (Exception e)
            {
                server.Disconnect();
                Console.WriteLine(e.Message);
            }
        }