aboutsummaryrefslogtreecommitdiff
path: root/doc/libmicrohttpd.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/libmicrohttpd.texi')
-rw-r--r--doc/libmicrohttpd.texi27
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/libmicrohttpd.texi b/doc/libmicrohttpd.texi
index 3fa143cc..76dc918b 100644
--- a/doc/libmicrohttpd.texi
+++ b/doc/libmicrohttpd.texi
@@ -269,6 +269,33 @@ specifies path to libgnutls installation
269 269
270@end table 270@end table
271 271
272@section Validity of pointers
273
274MHD will give applications access to its internal data structures
275via pointers via arguments and return values from its API. This
276creates the question as to how long those pointers are assured to
277stay valid.
278
279Most MHD data structures are associated with the connection of an
280HTTP client. Thus, pointers associated with a connection are
281typically valid until the connection is finished, at which point
282MHD will call the @code{MHD_RequestCompletedCallback} if one is
283registered. Applications that have such a callback registered
284may assume that keys and values from the
285@code{MHD_KeyValueIterator}, return values from
286@code{MHD_lookup_connection_value} and the @code{url},
287@code{method} and @code{version} arguments to the
288@code{MHD_AccessHandlerCallback} will remain valid until the
289respective @code{MHD_RequestCompletedCallback} is invoked.
290
291In contrast, the @code{upload_data} argument of
292@code{MHD_RequestCompletedCallback} as well as all pointers
293from the @code{MHD_PostDataIterator} are only valid for the
294duration of the callback.
295
296Pointers returned from @code{MHD_get_response_header} are
297valid as long as the response itself is valid.
298
272 299
273@section Including the microhttpd.h header 300@section Including the microhttpd.h header
274@cindex portability 301@cindex portability