diff options
Diffstat (limited to 'doc/libmicrohttpd.texi')
-rw-r--r-- | doc/libmicrohttpd.texi | 27 |
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 | |||
274 | MHD will give applications access to its internal data structures | ||
275 | via pointers via arguments and return values from its API. This | ||
276 | creates the question as to how long those pointers are assured to | ||
277 | stay valid. | ||
278 | |||
279 | Most MHD data structures are associated with the connection of an | ||
280 | HTTP client. Thus, pointers associated with a connection are | ||
281 | typically valid until the connection is finished, at which point | ||
282 | MHD will call the @code{MHD_RequestCompletedCallback} if one is | ||
283 | registered. Applications that have such a callback registered | ||
284 | may 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 | ||
289 | respective @code{MHD_RequestCompletedCallback} is invoked. | ||
290 | |||
291 | In contrast, the @code{upload_data} argument of | ||
292 | @code{MHD_RequestCompletedCallback} as well as all pointers | ||
293 | from the @code{MHD_PostDataIterator} are only valid for the | ||
294 | duration of the callback. | ||
295 | |||
296 | Pointers returned from @code{MHD_get_response_header} are | ||
297 | valid 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 |