![](/media/cache/profiles/fa42af438e58b799189dd26386f5870f.jpg.50x50_q85.jpg)
Simple HTTP example
Dependencies: LWIPInterface NetworkSocketAPI events funcptr mbed-rtos mbed
Diff: SimpleHTTP.h
- Revision:
- 1:ca2041d3a4a6
- Parent:
- 0:9dd004b6a8b7
--- a/SimpleHTTP.h Thu Apr 21 18:36:07 2016 -0500 +++ b/SimpleHTTP.h Fri Apr 22 03:21:03 2016 -0500 @@ -5,6 +5,7 @@ #define SIMPLE_HTTP_H #include "FuncPtr.h" +#include "EventLoop.h" #include "Event.h" #include "TCPServer.h" #include <map> @@ -16,7 +17,7 @@ public: /** SimpleHTTP server lifetime */ - SimpleHTTP(EventQueue *queue, NetworkStack *stack); + SimpleHTTP(NetworkStack *stack); ~SimpleHTTP(); /** Start serving HTTP requests @@ -44,7 +45,7 @@ unsigned get_recv(); private: - EventQueue *_queue; + EventLoop _loop; NetworkStack *_stack; TCPServer _server; std::map<std::string, FuncPtr<int(char *, unsigned)> > _get_cbs;