Exemple #1
0
        static void Main(string[] args)
        {
            string     directory = Directory.GetCurrentDirectory() + "/html";
            HTTPServer myServer  = new HTTPServer(directory, "127.0.0.1", 3001);

            myServer.Start();
        }
Exemple #2
0
 static void Main(string[] args)
 {
     try
     {
         HTTPServer server = new HTTPServer(10, 80);
         server.Start();
     } catch (Exception e) {
         Console.WriteLine(e.Message);
     }
 }
Exemple #3
0
        static void Main(string[] args)
        {
            Console.WriteLine("hello");
            string directory = Directory.GetCurrentDirectory() + "\\html";

            Console.WriteLine(directory);
            HTTPServer myServer = new HTTPServer(directory, "127.0.0.1", 3001);

            myServer.Start();
        }
Exemple #4
0
        static void Main(string[] args)
        {
            string path;

            //L:\Web\data\sites
            Console.WriteLine("Введите к файлу сайта");
            path = Console.ReadLine();
            Console.WriteLine("Введите end для завершения\n");

            HTTPServer server = new HTTPServer(path);

            while (Console.ReadLine() != "end")
            {
                Console.WriteLine("Введите end для завершения\n");
            }

            server.Stop();
        }