Http might reply with chunks. So we need to dechunk the data. see https://en.wikipedia.org/wiki/Chunked_transfer_encoding.
More...
#include <HttpChunkReader.h>
Http might reply with chunks. So we need to dechunk the data. see https://en.wikipedia.org/wiki/Chunked_transfer_encoding.
- Author
- Phil Schatzmann
- Copyright
- GPLv3
◆ HttpChunkReader() [1/2]
◆ HttpChunkReader() [2/2]
constructor for processing final header information
◆ available()
returns the number of bytes which are still available in the current chunk
◆ open()
opens the chunk reader and reads the first chunk length
◆ read()
reads a block of data from the chunks
◆ readChunkLen()
◆ readln()
reads a single line from the chunks
◆ readlnInternal()
reads up the the next CR LF - but never more then the indicated len.
◆ removeCRLF()
| void removeCRLF |
( |
Client & |
client | ) |
|
|
inlineprotected |
◆ waitAndConsume()
| void waitAndConsume |
( |
Client & |
client, |
|
|
char |
expected |
|
) |
| |
|
inlineprotected |
Waits (bounded by a short timeout) for the next byte to arrive and, if it matches expected, consumes it - logs (but does not throw) if a different byte or no byte at all shows up, since that means the stream is already desynced and readChunkLen() right after this will detect and report it.
◆ has_ended
◆ http_header_ptr
◆ last_logged_stall_len
| int last_logged_stall_len = -1 |
|
protected |
◆ open_chunk_len
The documentation for this class was generated from the following file: