A stack which works with or without an Mbed os library. Provides IPv4 or IPv6 with a full 1500 byte buffer.

Dependents:   oldheating gps motorhome heating

Revision:
144:6bd5c54efc7d
Parent:
141:25047f31dbab
Child:
145:206bf0d073c7
--- a/tcp/http/http.h	Thu May 09 07:47:12 2019 +0000
+++ b/tcp/http/http.h	Sun May 12 17:17:49 2019 +0000
@@ -17,6 +17,7 @@
 extern void   HttpAddInt32AsHex (int value);
 extern void   HttpAddInt64AsHex (int64_t value);
 extern void   HttpAddTm         (struct tm* ptm);
+extern int    HttpGetLength     (void);
 
 extern void   HttpOk(const char* contentType, const char* cacheControl, const char* lastModifiedDate, const char* lastModifiedTime);
 extern char*  HttpOkCookieName;
@@ -33,12 +34,12 @@
 extern int    HttpQueryValueAsInt(char* pValue);
 extern void   HttpQueryUnencode  (char* pValue);
 
-extern void (*HttpRequestFunction)(int size, char* pRequestStream, uint32_t positionInRequestStream, int* pToDo, bool* pPostComplete, uint32_t* pDelayUntil);
-extern void (*HttpReplyFunction  )(int todo);
+extern void (*HttpRequestFunction)(int size, char* pRequestStream, uint32_t positionInRequestStream, char* pState);
+extern int  (*HttpReplyFunction  )(char* pState);
 
 extern bool   HttpTrace;
-extern void   HttpHandleRequest(int   size, char* pRequestStream, uint32_t positionInRequestStream, int* pToDo, bool* pPostComplete, uint32_t* pDelayUntil);
-extern void   HttpSendReply    (int* pSize, char* pReplyStream,   uint32_t positionInReplyStream, uint16_t mss, int todo);
+extern void   HttpHandleRequest(int   size, char* pRequestStream, uint32_t positionInRequestStream, char* pState);
+extern int    HttpSendReply    (int* pSize, char* pReplyStream,   uint32_t positionInReplyStream, uint16_t mss, char* pState);
 
 extern void   HttpDateFromDateTime(const char* date, const char *ptime, char* ptext);
 extern void   HttpDateFromNow(char* pText);