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:
147:a6093b52e654
--- a/tcp/tcprecv.c	Tue May 14 15:09:39 2019 +0000
+++ b/tcp/tcprecv.c	Wed May 15 15:33:15 2019 +0000
@@ -11,7 +11,7 @@
 #include     "tcb.h"
 #include     "ip4.h"
 #include    "dhcp.h"
-#include    "http.h"
+#include "httpshim.h"
 #include     "led.h"
 #include "mstimer.h"
 #include "restart.h"
@@ -57,9 +57,9 @@
     char* pData = (char*)pPacket + TcpHdrSizeGet();
     switch (pTcb->locPort)
     {
-        case  80: HttpRequest (dataLength, pData, position, pTcb->appData); break;
-        case 443: HttpsRequest(dataLength, pData, position, pTcb->appData); break;
-        default:                                                            break;
+        case  80: HttpShimRequest(dataLength, pData, position, pTcb->appData, false); break;
+        case 443: HttpShimRequest(dataLength, pData, position, pTcb->appData, true ); break;
+        default:                                                                      break;
     }
 }
 static int sendResetFromPacket(int* pSizeTx, void* pPacketTx, int ipType, int remArIndex, int locIpScope, int seqLengthRcvd)
@@ -134,7 +134,7 @@
     switch (TcpHdrDstPort)
     {
         case 80:
-            if (HttpTrace)
+            if (HttpShimGetTrace())
             {
                 if (NetTraceNewLine) Log("\r\n");
                 LogTime("HTTP server request\r\n");
@@ -143,7 +143,7 @@
             break;
             
         case 443:
-            if (HttpsTrace)
+            if (HttpShimGetTrace())
             {
                 if (NetTraceNewLine) Log("\r\n");
                 LogTime("HTTPS server request\r\n");