#include <icy/http/server.h>Caches the formatted Date header, updated once per second. Avoids per-request time formatting and string allocation.
| Return | Name | Description |
|---|---|---|
char | buf | |
size_t | len | |
std::time_t | lastSecond |
char buf {}size_t len = 0std::time_t lastSecond = 0| Return | Name | Description |
|---|---|---|
void | update inline | Refreshes the cached Date header string if the current second has changed. No-op if called multiple times within the same second. |
const char * | data const inline | Returns a pointer to the formatted "Date: ...\r\n" header string. |
size_t | size const inline | Returns the byte length of the formatted Date header string. |
inline
inline void update()Refreshes the cached Date header string if the current second has changed. No-op if called multiple times within the same second.
const inline
inline const char * data() constReturns a pointer to the formatted "Date: ...\r\n" header string.
const inline
inline size_t size() constReturns the byte length of the formatted Date header string.