Andrew Boyson / net

Dependents:   oldheating gps motorhome heating

Revision:
146:0fc66d610fd6
Parent:
145:206bf0d073c7
Child:
147:a6093b52e654
--- a/tcp/http/httpshim.c	Tue May 14 15:09:39 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-#include <stdbool.h>
-
-#include "tcp.h"
-#include "tcpbuf.h"
-#include "tls.h"
-
-//Plumb into these from your html server
-void (*HttpRequestFunction)(int size, char* pRequestStream, uint32_t positionInRequestStream, char* pState);
-bool (*HttpReplyPollFunction)(char* pState, bool clientFinished);
-
-void HttpRequest(int size, char* pRequestStream, uint32_t positionInRequestStream, char* pState)
-{
-    HttpRequestFunction(size, pRequestStream, positionInRequestStream, pState);
-}
-void HttpsRequest(int size, char* pRequestStream, uint32_t positionInRequestStream, char* pState)
-{
-    TlsRequest         (size, pRequestStream, positionInRequestStream, pState);
-}
-bool HttpBufFilled(void)
-{
-    return TcpBufFilled();
-}
-
-static bool tlsRequired;
-bool HttpReplyPoll (char* pState, bool clientFinished)
-{
-    tlsRequired = false;
-    return HttpReplyPollFunction(pState, clientFinished);
-}
-bool HttpsReplyPoll(char* pState, bool clientFinished)
-{
-    tlsRequired = true;
-    return TlsReplyPoll(pState, clientFinished);
-}
-void HttpAddChar  (char c)
-{
-    if (tlsRequired) TlsAddChar(c);
-    else          TcpBufAddChar(c);
-}
\ No newline at end of file