This is a simplest HTTP server made ​​of libMiMic. It will echo back a request path.

Dependencies:   libMiMic mbed-rtos mbed NySDFileSystem

最も簡単なhttpdです。 クライアントから送信されてきたURLをHtmlにして返します。

ModUrlモジュールのサンプルでもあります。

This program is simple httpserver.

This is tutorial for ModUrl module.

Revision:
9:a70e98dd2a25
Parent:
7:8d030ae8ddc3
--- a/main.cpp	Thu Jul 11 03:55:51 2013 +0000
+++ b/main.cpp	Fri Aug 09 09:07:24 2013 +0000
@@ -1,16 +1,17 @@
 #include "mimic.h"
  
- 
  LocalFileSystem2 lf("local");
+
 /**
- * 
+ * This program is simplest httpd.
+ * The program echo back yuor request in html.
  */
 class SimpleHttpd:public MiMic::Httpd
 {
 private:
     ModUrl modurl; //basic URL parser
 public:
-    SimpleHttpd(NetConfig& i_cfg):Httpd(i_cfg._inst.services.http_port)
+    SimpleHttpd(NetConfig& i_cfg):Httpd(i_cfg.getHttpPort())
     {
     }
     virtual void onRequest(HttpdConnection& i_connection)
@@ -41,6 +42,8 @@
 
     //try to override setting by local file.
     cfg.loadFromFile("/local/mimic.cfg");
+    cfg.setSrvUPnP(false);//disable UPnP
+    cfg.setSrvMdns(false);//disable mDNS
     
     SimpleHttpd httpd(cfg); //create a httpd instance.
     net.start(cfg);