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:
71:736a5747ade1
Parent:
61:aad055f1b0d1
Child:
73:43e3d7fb3d60
--- a/tcp/http/http.c	Fri Feb 16 17:31:52 2018 +0000
+++ b/tcp/http/http.c	Sat Oct 20 18:56:13 2018 +0000
@@ -11,7 +11,7 @@
 void (*HttpReplyFunction  )(int todo);                                       //Plumb into this from your html server
 int  (*HttpRequestFunction)(char *pPath, char *pLastModified, char *pQuery); //Plumb into this from your html server
 
-int HttpHandleRequest(int* pSize, char* pRequestStream, int positionInRequestStream, char* pReplyStream, int positionInReplyStream, uint16_t mss, int* pToDo)
+void HttpHandleRequest(int* pSize, char* pRequestStream, int positionInRequestStream, int* pToDo)
 {
     if (HttpTrace)
     {
@@ -28,16 +28,15 @@
         *pToDo = HttpRequestFunction(pPath, pLastModified, pQuery);
     }
     
-    //Handle sending of any data
+}
+void HttpSendReply(int* pSize, char* pReplyStream, int positionInReplyStream, uint16_t mss, int todo)
+{
     TcpBufStart(positionInReplyStream, mss, pReplyStream);
-    HttpReplyFunction(*pToDo);
+    HttpReplyFunction(todo);
     *pSize = TcpBufLength();
 
     if (HttpTrace)
     {
         LogF("HTTP  >>> %d (%d)\r\n", *pSize, positionInReplyStream);
     }
-
-    
-    return UNICAST;
-}
\ No newline at end of file
+}