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:
146:0fc66d610fd6
Parent:
145:206bf0d073c7
Child:
152:80a3840fc9f8
--- a/tcp/http/httpadd.c	Tue May 14 15:09:39 2019 +0000
+++ b/tcp/http/httpadd.c	Wed May 15 15:33:15 2019 +0000
@@ -2,12 +2,22 @@
 #include <stdio.h>
 
 #include "http.h"
+#include "httpshim.h"
 
+bool HttpBufFilled(void)
+{
+    return HttpShimBufFilled();
+}
+
+void HttpAddChar(char c)
+{
+    HttpShimAddChar(c);
+}
 void HttpFillChar (char c, int length)
 {
     while (length > 0)
     {
-        HttpAddChar(c);
+        HttpShimAddChar(c);
         length--;
     }
 }
@@ -16,7 +26,7 @@
     const char* start = text;
     while (*text)
     {
-        HttpAddChar(*text);
+        HttpShimAddChar(*text);
         text++;
     }
     return text - start;
@@ -40,7 +50,7 @@
 {
     while (length > 0)
     {
-        HttpAddChar(*data);
+        HttpShimAddChar(*data);
         data++;
         length--;
     }
@@ -52,7 +62,7 @@
     {
         int c = enumerateFunction();
         if (c == EOF) break;
-        HttpAddChar(c);
+        HttpShimAddChar(c);
     }
 }
 void HttpAddNibbleAsHex(int nibble)
@@ -62,7 +72,7 @@
     if      (nibble < 0x0A) c = nibble + '0';
     else if (nibble < 0x10) c = nibble - 0xA + 'A';
     else                    c = '0';
-    HttpAddChar(c);
+    HttpShimAddChar(c);
 }
 void HttpAddByteAsHex(int value)
 {