コード例 #1
0
 public static void Process(HttpListenerContext context)
 {
     try
     {
         WebPage webPage = new WebPage(context.Request);
         BrowserResponse.Send(webPage, context.Response);
     }
     catch (Exception e)
     {
         WebPage webPage = new WebPage();
         BrowserResponse.Send(webPage, context.Response);
     }
 }
コード例 #2
0
        public static void Process(HttpListenerContext context)
        {
            string responseText;
            try
            {
                string filePath = ParseUrl(context.Request);
                responseText = System.IO.File.ReadAllText(filePath);
            }
            catch (Exception e)
            {
                responseText = "Resource Not Found ";
            }
            

            BrowserResponse.Send(responseText, context.Response);
        }
コード例 #3
0
 public static void Process(HttpListenerContext context)
 {
     BrowserResponse.Send("<html><body><h1>Message</h1></body></html>", context.Response);
 }
コード例 #4
0
 public void Process(HttpListenerContext context)
 {
     BrowserResponse.Send()
 }
コード例 #5
0
 public void Process(HttpListenerContext context)
 {
     BrowserResponse.Send("<html><body> Message</body></html>")
 }