Simple HTTP Server with one page index.html stored inside MBED as char vector and javascript to update a table content
Fork of HTTP_SERVER by
Diff: HTTP_SERVER.h
- Revision:
- 14:f21da0acc9f6
- Parent:
- 12:cbf97b865d76
diff -r b6dd6ed0060b -r f21da0acc9f6 HTTP_SERVER.h --- a/HTTP_SERVER.h Fri Mar 16 21:55:50 2018 +0000 +++ b/HTTP_SERVER.h Thu May 10 20:24:03 2018 +0000 @@ -1,12 +1,13 @@ //HTTP_SERVER.h #ifndef HTTP_SERVER_H #define HTTP_SERVER_H -#include "mbed.h" + #include "EthernetInterface.h" -#include "ResponseMessenger.h" -#include "FileHandler.h" +#include "definitions.h" #include "string.h" -#include <stdlib.h> + +#define MAX_BUFFER_SIZE 1024 + using namespace std; enum PortNum { @@ -35,19 +36,11 @@ * @retval TRUE at error end. * @retval FALSE at normal end. */ - bool run(); + bool run(channel *CH); -private: // Handlers - EthernetInterface eth; // Eternet TCPSocketServer tcpsvr; // TCP server TCPSocketConnection tcpcon; // TCP server connection clerk - ResponseMessenger msger; // Messenger for a client - FileHandler fhandl; // - // Param - bool keep_alive; - bool listening_flag; - char req_buf[1024]; }; #endif \ No newline at end of file