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/tcpsend.c
- Revision:
- 146:0fc66d610fd6
- Parent:
- 145:206bf0d073c7
- Child:
- 147:a6093b52e654
--- a/tcp/tcpsend.c Tue May 14 15:09:39 2019 +0000 +++ b/tcp/tcpsend.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 "tcpsend.h" #include "mstimer.h" @@ -34,15 +34,13 @@ } } - static bool doTrace(uint16_t port) { switch (port) { - case 80: - if (HttpTrace) return true; - default: - return false; + case 80: + case 443: return HttpShimGetTrace(); + default: return false; } } static bool addApplicationData(int *pDataLength, void* pPacket, uint16_t port, uint32_t start, int mss, char* pAppState, bool clientFinished) @@ -52,8 +50,8 @@ bool finished = false; switch (port) { - case 80: finished = HttpReplyPoll (pAppState, clientFinished); break; - case 443: finished = HttpsReplyPoll(pAppState, clientFinished); break; + case 80: finished = HttpShimReplyPoll(pAppState, clientFinished, false); break; + case 443: finished = HttpShimReplyPoll(pAppState, clientFinished, true ); break; } *pDataLength = TcpBufLength(); return finished;