libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 36d3808c1e7f9646e6a9ca1cad42a4297f12c5ee
parent 22a5fb5239fa471c97e81f93e5058e7fb7143eaa
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon, 17 Oct 2016 10:16:42 +0200

clean up leftovers in upgrade documentation

Diffstat:
Mpo/POTFILES.in | 1+
Msrc/include/microhttpd.h | 27++++++++-------------------
2 files changed, 9 insertions(+), 19 deletions(-)

diff --git a/po/POTFILES.in b/po/POTFILES.in @@ -42,6 +42,7 @@ src/testcurl/https/tls_test_common.c src/testzzuf/socat.c src/include/mhd_options.h src/include/microhttpd.h +src/microhttpd/internal.h src/microhttpd/mhd_compat.h src/microhttpd/mhd_itc.h src/microhttpd/mhd_locks.h diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h @@ -2299,25 +2299,14 @@ MHD_upgrade_action (struct MHD_UpgradeResponseHandle *urh, * successfully and the socket should now be controlled by some * protocol other than HTTP. * - * Any data received on the socket will be made available in - * 'data_in'. The function should update 'data_in_size' to - * reflect the number of bytes consumed from 'data_in' (the remaining - * bytes will be made available in the next call to the handler). - * - * Any data that should be transmitted on the socket should be - * stored in 'data_out'. '*data_out_size' is initially set to - * the available buffer space in 'data_out'. It should be set to - * the number of bytes stored in 'data_out' (which can be zero). - * - * The return value is a BITMASK that indicates how the function - * intends to interact with the event loop. It can request to be - * notified for reading, writing, request to UNCORK the send buffer - * (which MHD is allowed to ignore, if it is not possible to uncork on - * the local platform), to wait for the 'external' select loop to - * trigger another round. It is also possible to specify "no events" - * to terminate the connection; in this case, the - * #MHD_RequestCompletedCallback will be called and all resources of - * the connection will be released. + * Any data already received on the socket will be made available in + * @e extra_in. This can happen if the application sent extra data + * before MHD send the upgrade response. The application should + * treat data from @a extra_in as if it had read it from the socket. + * + * Note that the application must not close() @a sock directly, + * but instead use #MHD_upgrade_action() for special operations + * on @a sock. * * Except when in 'thread-per-connection' mode, implementations * of this function should never block (as it will still be called