Working Multithreaded HTTP Server using WiFly module. Currently only supporting GET method.
Dependencies: WiFlyHTTPServer WiflyInterface mbed-rpc mbed-rtos mbed
RTOS Wifly HTTP Server
This sample application demonstrates how the HTTP Server can be used in a multithreaded (RTOS) Environment. However currently only the GET method is supported.
main.cpp
- Committer:
- leihen
- Date:
- 2013-06-26
- Revision:
- 1:40eadac4750b
- Parent:
- 0:9c6ebc97c758
File content as of revision 1:40eadac4750b:
#include "mbed.h" #include "HttpServer.h" #include "FsHandler.h" #include "LocalFileSystem.h" DigitalOut myled(LED1); Serial pc(USBTX, USBRX, "pc"); static LocalFileSystem local("local"); int main() { pc.baud(460800); HTTPFsRequestHandler::mount("/local/", "/"); HttpServer svr(p9, p10, p30, p29, "Spawnpoint", "Quantenoptik1", WPA); svr.addHandler<HTTPFsRequestHandler>("/"); // Start the server if (!svr.start(80) ) { error("SERVER FAILED TO START"); } while(1) { myled = 1; wait(0.2); myled = 0; wait(0.2); } }