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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers httpv.c Source File

httpv.c

00001 #include <stdbool.h>
00002 #include <http.h>
00003 
00004 bool HttpvGetTrace()
00005 {
00006     return HttpGetTrace();
00007 }
00008 void HttpvReset(int connectionId)
00009 {
00010     HttpReset(connectionId);
00011 }
00012 bool HttpvResponse(int connection, bool clientFinished, int* pWindowSize, uint8_t* pWindow, uint32_t windowPositionInStream)
00013 {
00014     int status = HttpPoll(connection, clientFinished);
00015     bool finished;
00016     switch (status)
00017     {
00018         case HTTP_WAIT:                   finished = false;             *pWindowSize = 0;                               break;
00019         case HTTP_FINISHED:               finished = true;              *pWindowSize = 0;                               break;
00020         case HTTP_HAVE_SOMETHING_TO_SEND: finished = HttpAdd(connection, pWindowSize, (char*)pWindow, windowPositionInStream); break;
00021     }
00022     return finished;
00023 }
00024 void HttpvRequest (int connectionId, int windowSize, uint8_t* pWindow, uint32_t windowPositionInStream)
00025 {
00026     HttpRequest(connectionId, windowSize, (char*)pWindow, windowPositionInStream);
00027 }