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
Diff: tcp/http/http.h
- Revision:
- 126:62edacc9f14d
- Parent:
- 118:067cb5bce7e3
- Child:
- 127:fcdfbfad8770
--- a/tcp/http/http.h Fri Feb 22 11:26:55 2019 +0000 +++ b/tcp/http/http.h Mon Feb 25 20:59:19 2019 +0000 @@ -13,16 +13,18 @@ extern void HttpAddInt12AsHex (int value); extern void HttpAddInt16AsHex (int value); -extern void HttpRequestRead (char *p, int len, char** ppMethod, char** ppPath, char** ppQuery, char** ppLastModified); +extern int HttpRequestRead (char *p, int len, char** ppMethod, char** ppPath, char** ppQuery, char** ppLastModified, int* pContentLength); extern char* HttpQuerySplit (char* pQuery, char** ppName, char** ppValue); extern void HttpQueryUnencode(char* pValue); -extern int (*HttpRequestFunction)(char *pPath, char* pLastModified, char *pQuery); -extern void (*HttpReplyFunction)(int todo); +extern int (*HttpRequestFunction)(char *pPath, char* pLastModified); +extern void (*HttpGetFunction )(int todo, char *pQuery); +extern bool (*HttpPostFunction )(int todo, int contentLength, int contentStart, int size, char* pRequestStream, uint32_t positionInRequestStream); +extern void (*HttpReplyFunction )(int todo); extern bool HttpTrace; -extern void HttpHandleRequest(int size, char* pRequestStream, uint32_t positionInRequestStream, int* pToDo); +extern void HttpHandleRequest(int size, char* pRequestStream, uint32_t positionInRequestStream, int* pToDo, bool* pPostComplete); extern void HttpSendReply (int* pSize, char* pReplyStream, uint32_t positionInReplyStream, uint16_t mss, int todo); extern void HttpDateFromDateTime(const char* date, const char *ptime, char* ptext);