|
ProtoCore v0.0.1
Deterministic, zero-heap network stack for embedded targets
|
Response building for PC: template rendering, chunked/streaming responses, response headers + cookies, MIME typing, and the stats / Prometheus-metrics endpoints. More...
#include "network_drivers/transport/tcp.h"#include "protocore.h"#include "server/protocore_internal.h"#include "shared_primitives/hex.h"#include "shared_primitives/mime.h"#include "shared_primitives/strbuf.h"#include <stdio.h>#include <string.h>Go to the source code of this file.
Response building for PC: template rendering, chunked/streaming responses, response headers + cookies, MIME typing, and the stats / Prometheus-metrics endpoints.
Split out of protocore.cpp (single-purpose server files). The two-pass {{name}} template walk, the cross-loop chunked-send pump (paged like the file pump so a body is unbounded in constant memory), the per-response header/cookie buffer API, mime_type(), and the built-in stats/metrics handlers (rendered through the template engine from generated web assets). The chunked pump shares the per-slot SendCtx owned by protocore.cpp. Behavior is identical to the pre-split code.
Definition in file response.cpp.