diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-10-06 23:01:42 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-10-08 01:57:42 +0200 |
| commit | e77bd93693a74ce872d4c13fb45537c34518d84f (patch) | |
| tree | 8fb265064ebf9debed2e797cbdef42187524d158 /examples | |
| parent | db9cb051c4ee05c07ab32dfed5bae8b7dc0916bd (diff) | |
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.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/async/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |
