Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of HTTP_SERVER by
HTTP_SERVER.h
00001 //HTTP_SERVER.h 00002 #ifndef HTTP_SERVER_H 00003 #define HTTP_SERVER_H 00004 00005 #include "EthernetInterface.h" 00006 #include "definitions.h" 00007 #include "string.h" 00008 00009 #define MAX_BUFFER_SIZE 1024 00010 00011 using namespace std; 00012 00013 enum PortNum { 00014 TCP_PORT = 80 00015 }; 00016 /** HttpServer class 00017 * 00018 * This is the class to make a mbed a simple HTTP Server. 00019 */ 00020 class HttpServer 00021 { 00022 public: 00023 HttpServer(); 00024 ~HttpServer(); 00025 /** HTTP SERVER Initialization. 00026 * 00027 * This function should be called first of all. 00028 * @return result of init() as boolean. 00029 * @retval TRUE SACCESS 00030 * @retval FALSE 00031 */ 00032 bool init(); 00033 /** Run the surver service while listening flag is true. 00034 * 00035 * @return state ending. 00036 * @retval TRUE at error end. 00037 * @retval FALSE at normal end. 00038 */ 00039 bool run(channel *CH); 00040 00041 // Handlers 00042 TCPSocketServer tcpsvr; // TCP server 00043 TCPSocketConnection tcpcon; // TCP server connection clerk 00044 }; 00045 00046 #endif
Generated on Tue Jul 12 2022 18:37:54 by
1.7.2
