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@96:43eb7a110f1a, 2018-12-29 (annotated)
- Committer:
- andrewboyson
- Date:
- Sat Dec 29 19:03:50 2018 +0000
- Revision:
- 96:43eb7a110f1a
- Parent:
- 79:f50e02fb5c94
- Child:
- 109:bca6ebe63e32
Added ability to add hex nibbles to HTTP
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 | 61:aad055f1b0d1 | 4 | |
andrewboyson | 96:43eb7a110f1a | 5 | extern void HttpAddChar (char c); |
andrewboyson | 96:43eb7a110f1a | 6 | extern void HttpFillChar (char c, int length); |
andrewboyson | 96:43eb7a110f1a | 7 | extern int HttpAddText (const char* text); |
andrewboyson | 96:43eb7a110f1a | 8 | extern int HttpAddV (char *fmt, va_list argptr); |
andrewboyson | 96:43eb7a110f1a | 9 | extern int HttpAddF (char *fmt, ...); |
andrewboyson | 96:43eb7a110f1a | 10 | extern void HttpAddData (const char* data, int length); |
andrewboyson | 96:43eb7a110f1a | 11 | extern void HttpAddStream (void (*startFunction)(void), int (*enumerateFunction)(void)); |
andrewboyson | 96:43eb7a110f1a | 12 | extern void HttpAddNibbleAsHex(int value); |
andrewboyson | 96:43eb7a110f1a | 13 | extern void HttpAddInt12AsHex (int value); |
andrewboyson | 96:43eb7a110f1a | 14 | extern void HttpAddInt16AsHex (int value); |
andrewboyson | 54:84ef2b29cf7e | 15 | |
andrewboyson | 54:84ef2b29cf7e | 16 | extern void HttpReadRequest (char *p, int len, char** ppMethod, char** ppPath, char** ppQuery, char** ppLastModified); |
andrewboyson | 54:84ef2b29cf7e | 17 | extern char* HttpGetNextLine (char* p, char* pE); |
andrewboyson | 54:84ef2b29cf7e | 18 | extern void HttpSplitRequest(char* p, char** ppMethod, char** ppPath, char** ppQuery); |
andrewboyson | 54:84ef2b29cf7e | 19 | extern void HttpSplitHeader (char* p, char** ppName, char** ppValue); |
andrewboyson | 54:84ef2b29cf7e | 20 | extern char* HttpSplitQuery (char* p, char** ppName, char** ppValue); |
andrewboyson | 54:84ef2b29cf7e | 21 | extern void HttpDecodeValue (char* value); |
andrewboyson | 54:84ef2b29cf7e | 22 | |
andrewboyson | 54:84ef2b29cf7e | 23 | extern int (*HttpRequestFunction)(char *pPath, char* pLastModified, char *pQuery); |
andrewboyson | 54:84ef2b29cf7e | 24 | extern void (*HttpReplyFunction)(int todo); |
andrewboyson | 54:84ef2b29cf7e | 25 | |
andrewboyson | 54:84ef2b29cf7e | 26 | extern bool HttpTrace; |
andrewboyson | 79:f50e02fb5c94 | 27 | extern void HttpHandleRequest(int size, char* pRequestStream, uint32_t positionInRequestStream, int* pToDo); |
andrewboyson | 79:f50e02fb5c94 | 28 | extern void HttpSendReply (int* pSize, char* pReplyStream, uint32_t positionInReplyStream, uint16_t mss, int todo); |
andrewboyson | 54:84ef2b29cf7e | 29 | |
andrewboyson | 54:84ef2b29cf7e | 30 | extern void HttpDateFromDateTime(const char* date, const char *ptime, char* ptext); |
andrewboyson | 54:84ef2b29cf7e | 31 | extern void HttpDateFromNow(char* pText); |
andrewboyson | 54:84ef2b29cf7e | 32 | |
andrewboyson | 54:84ef2b29cf7e | 33 | #define HTTP_DATE_LENGTH 30 |
andrewboyson | 54:84ef2b29cf7e | 34 |