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
tcp/http/http.h@127:fcdfbfad8770, 2019-03-08 (annotated)
- Committer:
- andrewboyson
- Date:
- Fri Mar 08 18:43:56 2019 +0000
- Revision:
- 127:fcdfbfad8770
- Parent:
- 126:62edacc9f14d
- Child:
- 129:9c57197fb698
Moved the display tm from page to http where it makes more sense.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
andrewboyson | 61:aad055f1b0d1 | 1 | #include <stdbool.h> |
andrewboyson | 61:aad055f1b0d1 | 2 | #include <stdarg.h> |
andrewboyson | 61:aad055f1b0d1 | 3 | #include <stdint.h> |
andrewboyson | 127:fcdfbfad8770 | 4 | #include <time.h> |
andrewboyson | 61:aad055f1b0d1 | 5 | |
andrewboyson | 96:43eb7a110f1a | 6 | extern void HttpAddChar (char c); |
andrewboyson | 96:43eb7a110f1a | 7 | extern void HttpFillChar (char c, int length); |
andrewboyson | 96:43eb7a110f1a | 8 | extern int HttpAddText (const char* text); |
andrewboyson | 96:43eb7a110f1a | 9 | extern int HttpAddV (char *fmt, va_list argptr); |
andrewboyson | 96:43eb7a110f1a | 10 | extern int HttpAddF (char *fmt, ...); |
andrewboyson | 96:43eb7a110f1a | 11 | extern void HttpAddData (const char* data, int length); |
andrewboyson | 96:43eb7a110f1a | 12 | extern void HttpAddStream (void (*startFunction)(void), int (*enumerateFunction)(void)); |
andrewboyson | 96:43eb7a110f1a | 13 | extern void HttpAddNibbleAsHex(int value); |
andrewboyson | 96:43eb7a110f1a | 14 | extern void HttpAddInt12AsHex (int value); |
andrewboyson | 96:43eb7a110f1a | 15 | extern void HttpAddInt16AsHex (int value); |
andrewboyson | 127:fcdfbfad8770 | 16 | extern void HttpAddTm (struct tm* ptm); |
andrewboyson | 54:84ef2b29cf7e | 17 | |
andrewboyson | 126:62edacc9f14d | 18 | extern int HttpRequestRead (char *p, int len, char** ppMethod, char** ppPath, char** ppQuery, char** ppLastModified, int* pContentLength); |
andrewboyson | 110:67c96c143c2a | 19 | |
andrewboyson | 110:67c96c143c2a | 20 | extern char* HttpQuerySplit (char* pQuery, char** ppName, char** ppValue); |
andrewboyson | 110:67c96c143c2a | 21 | extern void HttpQueryUnencode(char* pValue); |
andrewboyson | 54:84ef2b29cf7e | 22 | |
andrewboyson | 126:62edacc9f14d | 23 | extern int (*HttpRequestFunction)(char *pPath, char* pLastModified); |
andrewboyson | 126:62edacc9f14d | 24 | extern void (*HttpGetFunction )(int todo, char *pQuery); |
andrewboyson | 126:62edacc9f14d | 25 | extern bool (*HttpPostFunction )(int todo, int contentLength, int contentStart, int size, char* pRequestStream, uint32_t positionInRequestStream); |
andrewboyson | 126:62edacc9f14d | 26 | extern void (*HttpReplyFunction )(int todo); |
andrewboyson | 54:84ef2b29cf7e | 27 | |
andrewboyson | 54:84ef2b29cf7e | 28 | extern bool HttpTrace; |
andrewboyson | 126:62edacc9f14d | 29 | extern void HttpHandleRequest(int size, char* pRequestStream, uint32_t positionInRequestStream, int* pToDo, bool* pPostComplete); |
andrewboyson | 79:f50e02fb5c94 | 30 | extern void HttpSendReply (int* pSize, char* pReplyStream, uint32_t positionInReplyStream, uint16_t mss, int todo); |
andrewboyson | 54:84ef2b29cf7e | 31 | |
andrewboyson | 54:84ef2b29cf7e | 32 | extern void HttpDateFromDateTime(const char* date, const char *ptime, char* ptext); |
andrewboyson | 54:84ef2b29cf7e | 33 | extern void HttpDateFromNow(char* pText); |
andrewboyson | 54:84ef2b29cf7e | 34 | |
andrewboyson | 118:067cb5bce7e3 | 35 | extern bool HttpSameStr (const char* pa, const char* pb); |
andrewboyson | 118:067cb5bce7e3 | 36 | extern bool HttpSameStrCaseInsensitive(const char* pa, const char* pb); |
andrewboyson | 118:067cb5bce7e3 | 37 | extern bool HttpSameDate (const char* date, const char* time, const char* pOtherDate); |
andrewboyson | 109:bca6ebe63e32 | 38 | |
andrewboyson | 54:84ef2b29cf7e | 39 | #define HTTP_DATE_LENGTH 30 |
andrewboyson | 54:84ef2b29cf7e | 40 |