Added a new range attribut in order to handle the http bytes-range command (to be done)

This commit is contained in:
anschrammh 2019-11-17 10:58:43 +01:00
parent 4ee100d16b
commit c19c15dd07
2 changed files with 2 additions and 1 deletions

View File

@ -2,7 +2,7 @@
//#define DEBUG_WEBCL //#define DEBUG_WEBCL
WEBClient::WEBClient(WiFiClient client, uint8_t id, uint16_t maxResourceBuffer, uint16_t maxBodyBuffer, uint16_t dataBufferSize) : TCPClient(client, id, dataBufferSize), _WEBClientState(WEBServer<WEBClient>::WEBClientState::ACCEPTED), _httpParserState(WEBServer<WEBClient>::HttpParserStatus::HTTP_VERB), _fileSentBytes(0) WEBClient::WEBClient(WiFiClient client, uint8_t id, uint16_t maxResourceBuffer, uint16_t maxBodyBuffer, uint16_t dataBufferSize) : TCPClient(client, id, dataBufferSize), _WEBClientState(WEBServer<WEBClient>::WEBClientState::ACCEPTED), _httpParserState(WEBServer<WEBClient>::HttpParserStatus::HTTP_VERB), _fileSentBytes(0), _range(0)
{ {
#ifdef DEBUG_WEBCL #ifdef DEBUG_WEBCL
Serial.println("WEBClient : Standard constructor called"); Serial.println("WEBClient : Standard constructor called");

View File

@ -17,6 +17,7 @@ class WEBClient : public TCPClient
WEBServer<WEBClient>::HttpRequestData _httpRequestData; WEBServer<WEBClient>::HttpRequestData _httpRequestData;
WEBServer<WEBClient>::HttpParserStatus _httpParserState; WEBServer<WEBClient>::HttpParserStatus _httpParserState;
uint64_t _fileSentBytes; uint64_t _fileSentBytes;
uint64_t _range; //Used to store the value of the range param for file downloading
void clearHttpRequestData(); void clearHttpRequestData();
}; };