FastLED 3.9.15
Loading...
Searching...
No Matches

◆ chunkOverhead()

size_t fl::net::http::ChunkedWriter::chunkOverhead ( size_t dataLen)
static

Definition at line 178 of file chunked_encoding.cpp.hpp.

178 {
179 // Overhead: hex-digits + "\r\n" + data + "\r\n"
180 // Count hex digits needed
181 char sizeHex[32];
182 int hexLen = fl::snprintf(sizeHex, sizeof(sizeHex), "%zx", dataLen);
183 return static_cast<size_t>(hexLen) + 2 + dataLen + 2; // hex + \r\n + data + \r\n
184}
int snprintf(char *buffer, fl::size size, const char *format, const Args &... args) FL_NOEXCEPT
Snprintf-like formatting function that writes to a buffer.
Definition stdio.h:666

References fl::snprintf().

Referenced by fl::net::http::HttpStreamTransport::writeResponse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: