From e77bd93693a74ce872d4c13fb45537c34518d84f Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Mon, 6 Oct 2025 23:01:42 +0200 Subject: Implement HTTP chunk encoding A new function pointer, namely chunk, has been added to struct http_response so that library users can generate their message bodies dynamically. --- examples/async/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/async/main.c b/examples/async/main.c index dbf69a8..fbd766e 100644 --- a/examples/async/main.c +++ b/examples/async/main.c @@ -86,9 +86,9 @@ end: } static int step(const struct http_payload *const pl, - struct http_response *const r, void *const user, void *step_args) + struct http_response *const r, void *const user, void *args) { - unsigned *const cnt = step_args; + unsigned *const cnt = args; const unsigned max = 10; fprintf(stderr, "%s: step %u\n", __func__, *cnt); @@ -113,7 +113,7 @@ static int hello(const struct http_payload *const pl, *r = (const struct http_response) { .step.payload = step, - .step_args = cnt + .args = cnt }; *cnt = 0; -- cgit v1.2.3