diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-10-08 01:51:15 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-10-08 01:57:42 +0200 |
| commit | e85d90fbf37cbd5a3264a2debd9b51438836c729 (patch) | |
| tree | 91099c585fe8c90f1d926f74734a1d23e3c65d64 /doc/man7/libweb_http.7 | |
| parent | 594917d7b2170f7e946e2cc7e9c5de3f6e4775be (diff) | |
Free chunk/step user data on context free
So far, users had no way to free user-defined data allocated inside the
chunk/step function pointers whenever an error occurred.
Now, the free callback can be also used in conjunction with chunk/step,
so that user-defined data is now deallocated when the operation
finishes (in the case of chunk-encoded data) or an error occurs.
Diffstat (limited to 'doc/man7/libweb_http.7')
| -rw-r--r-- | doc/man7/libweb_http.7 | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/doc/man7/libweb_http.7 b/doc/man7/libweb_http.7 index 0963828..39fd4a5 100644 --- a/doc/man7/libweb_http.7 +++ b/doc/man7/libweb_http.7 @@ -675,9 +675,14 @@ object accordingly. .I free is a pointer to a function that frees the memory used by .I rw +or +.I args .B only if .I rw -is a valid pointer. Otherwise, +or +.I args +are valid pointers. +Otherwise, .I free must be a null pointer. @@ -710,6 +715,12 @@ pointed to by .I done to .IR true . +If not null, +.I free +shall be called when either all chunks have been transferred +or whenever an error occurs, with +.I args +as its argument. .I step allows implementations to deal with responses asynchronously @@ -723,6 +734,11 @@ must be assigned to a function that can generate it later. .I libweb shall then call this function immediately later, without blocking other clients. +If not null, +.I free +shall be called whenever an error occurs, with +.I args +as its argument. Do not confuse .I step with |
