Ejemplo n.º 1
0
        public override void handlePOSTRequest(HttpProcessor p, StreamReader inputData)
        {
            string data = inputData.ReadToEnd();

            p.outputStream.WriteLine("<html><body><h1>test server</h1>");
            p.outputStream.WriteLine("<a href=/test>return</a><p>");
            p.outputStream.WriteLine("postbody: <pre>{0}</pre>", data);
        }
Ejemplo n.º 2
0
 public override void handleGETRequest(HttpProcessor p)
 {
     p.writeSuccess();
     p.outputStream.WriteLine("<html><body><h1>Orange Web Portal</h1>");
     p.outputStream.WriteLine("WARNING: This is Alpha stage software.<br>");
     p.outputStream.WriteLine("url : {0}<br>", p.http_url);
     p.outputStream.WriteLine(getModuleStatus());
     p.outputStream.WriteLine(getUserStatus());
     p.outputStream.WriteLine("</body></html>");
 }
Ejemplo n.º 3
0
 public abstract void handlePOSTRequest(HttpProcessor p, StreamReader inputData);
Ejemplo n.º 4
0
 public void listen()
 {
     listener = new TcpListener(port);
     listener.Start();
     while (is_active) {
         ModuleWatchdog.HeartBeat("Web Interface");
         TcpClient s = listener.AcceptTcpClient();
         HttpProcessor processor = new HttpProcessor(s, this);
         Thread thread = new Thread(new ThreadStart(processor.process));
         thread.Start();
         Thread.Sleep(1);
     }
 }
Ejemplo n.º 5
0
 public abstract void handleGETRequest(HttpProcessor p);