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 SW_HTTPServer by
Diff: SW_HTTPServer.h
- Revision:
- 29:00116fc9da74
- Parent:
- 28:f93ef41b78e1
- Child:
- 32:7ded9bacb546
--- a/SW_HTTPServer.h Fri Oct 11 02:33:46 2013 +0000 +++ b/SW_HTTPServer.h Fri Oct 11 23:47:31 2013 +0000 @@ -2,7 +2,7 @@ #ifndef SW_HTTPSERVER_H #define SW_HTTPSERVER_H #include "mbed.h" -//#include "MODSERIAL.h" // would like to hook in mod serial for higher performance, less blocking +#include "MODSERIAL.h" // would like to hook in mod serial for higher performance, less blocking #include "Wifly.h" #include "TCPSocketServer.h" #include "TCPSocketConnection.h" @@ -208,13 +208,13 @@ * on the CONTENT_LENGTH_REQUEST callback. The data is now available for processing. * The callback should return true to continue the processing. * @li SEND_PAGE - the callback should now send the html page, using as many svr->send() as needed. - * When the callback returns, it should always indicate true. + * When the callback returns, it should always indicate true that it has sent the page. * * @note The queryParams pointer purpose depends on the callback type. * For CONTENT_LENGTH_REQUEST, the pointer points to the name=value pairs from the * header. * For DATA_TRANSFER, the pointer points to the start of the actual data. - * For SEND_PAGE, + * For SEND_PAGE, ... <to be determined> * * @param svr is a handle to this class, so the callback has access to member functions * @param queryParams is a pointer based on the callback type. @@ -613,11 +613,16 @@ bool Extract(char * rec, char * needle, char ** string); void SendResponse(); - bool ParseHeader(char * bPtr); + HTTPServer::CallBackResults ParseHeader(char * bPtr); bool CheckDynamicHandlers(); int HexCharToInt(char c); char HexPairToChar(char * p); + + #ifdef DEBUG + void * MyMalloc(int x, int y); + char toP(void * x); + #endif }; #endif //SW_HTTPSERVER_H