Пример #1
0
        public static void Main(string[] args)
        {
            WebServer.Start(4220, 1);
            FilesWebService fileService = new FilesWebService(StandardFileSystem.Create("/home/jakeknott/Desktop"));

            WebServer.AddService(fileService);

            while (true)
            {
            }
        }
Пример #2
0
        static void master()
        {
            const string DefaultTemplate = "HTTP/1.1 200 OK\r\n" +
                                           "Content-Type:text/html\r\n" +
                                           "\r\n\r\n" +
                                           "<html>ID Number: {0}</br>" +
                                           "DateTime.Now: {1}</br>" +
                                           "Requested URL: {2}</html>";

            WebServer.Start(1337, 64);

            WebService service = new FilesWebService(StandardFileSystem.Create("/Users/ellio/desktop"));

            WebServer.AddService(service);
        }