aboutsummaryrefslogtreecommitdiff
path: root/src/include/microhttpd2.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-08-08 15:28:00 +0200
committerChristian Grothoff <christian@grothoff.org>2017-08-08 15:28:00 +0200
commit8a60c4cf02157b5a8afea02a9fb06c2f69cb5c44 (patch)
treec9b9ec5ae79344a006c3fb73e5ec87315b8acd09 /src/include/microhttpd2.h
parent1a5a035caa1027fcc5e41ca02d9e1858c46c0f36 (diff)
downloadlibmicrohttpd-8a60c4cf02157b5a8afea02a9fb06c2f69cb5c44.tar.gz
libmicrohttpd-8a60c4cf02157b5a8afea02a9fb06c2f69cb5c44.zip
improve comments, cosmetic
Diffstat (limited to 'src/include/microhttpd2.h')
-rw-r--r--src/include/microhttpd2.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/include/microhttpd2.h b/src/include/microhttpd2.h
index 4a6c07cf..f2c65761 100644
--- a/src/include/microhttpd2.h
+++ b/src/include/microhttpd2.h
@@ -56,7 +56,8 @@
56 * - make it impossible to queue a response at the wrong time 56 * - make it impossible to queue a response at the wrong time
57 * - make it clear which response status codes are "properly" 57 * - make it clear which response status codes are "properly"
58 * supported (include the descriptive string) by using an enum; 58 * supported (include the descriptive string) by using an enum;
59 * - simplify API for common-case of one-shot responses 59 * - simplify API for common-case of one-shot responses by
60 * eliminating need for destroy response in those cases;
60 */ 61 */
61 62
62 63
@@ -103,7 +104,10 @@ enum MHD_OptionValue;
103 104
104 105
105/** 106/**
106 * Option configuring the service. 107 * Option configuring the service. This struct should be treated as
108 * completely opaque by the application. It is declared in the header
109 * to support applications allocating arrays of this struct (in
110 * particular on the stack).
107 */ 111 */
108struct MHD_Option 112struct MHD_Option
109{ 113{
@@ -114,17 +118,17 @@ struct MHD_Option
114 enum MHD_OptionValue option; 118 enum MHD_OptionValue option;
115 119
116 /** 120 /**
117 * Option value. 121 * Option value. Internal-use only!
118 */ 122 */
119 intptr_t value1; 123 intptr_t value1;
120 124
121 /** 125 /**
122 * Option value. 126 * Option value. Internal-use only!
123 */ 127 */
124 intptr_t value2; 128 intptr_t value2;
125 129
126 /** 130 /**
127 * Option value. 131 * Option value. Internal-use only!
128 */ 132 */
129 intptr_t value3; 133 intptr_t value3;
130 134
@@ -177,7 +181,7 @@ MHD_option_suppress_date_no_clock (void);
177 * enforced by #MHD_option_allow_suspend_resume() and if there is no 181 * enforced by #MHD_option_allow_suspend_resume() and if there is no
178 * listen socket. #MHD_option_enable_itc() is always used 182 * listen socket. #MHD_option_enable_itc() is always used
179 * automatically on platforms where select()/poll()/other ignore 183 * automatically on platforms where select()/poll()/other ignore
180 * shutdown of listen socket. 184 * shutdown() of a listen socket.
181 * 185 *
182 * @return MHD option 186 * @return MHD option
183 */ 187 */
@@ -492,7 +496,7 @@ MHD_option_gnutls_credentials (int gnutls_credentials);
492 * the SNI information provided. The callback is expected to access 496 * the SNI information provided. The callback is expected to access
493 * the SNI data using `gnutls_server_name_get()`. Using this option 497 * the SNI data using `gnutls_server_name_get()`. Using this option
494 * requires GnuTLS 3.0 or higher. 498 * requires GnuTLS 3.0 or higher.
495 * 499 *
496 * @param cb must be of type `gnutls_certificate_retrieve_function2 *`. 500 * @param cb must be of type `gnutls_certificate_retrieve_function2 *`.
497 * @return MHD option 501 * @return MHD option
498 */ 502 */
@@ -1276,8 +1280,10 @@ enum MHD_HTTP_StatusCode {
1276 * request is suspended, MHD will not detect disconnects by the 1280 * request is suspended, MHD will not detect disconnects by the
1277 * client. 1281 * client.
1278 * 1282 *
1279 * The only safe time to suspend a request is from the 1283 * The only safe time to suspend a request is from either a
1280 * #MHD_AccessHandlerCallback. 1284 * #MHD_RequestHeaderCallback, #MHD_UploadCallback, or a
1285 * #MHD_RequestfetchResponseCallback. Suspending a request
1286 * at any other time will cause an assertion failure.
1281 * 1287 *
1282 * Finally, it is an API violation to call #MHD_stop_daemon while 1288 * Finally, it is an API violation to call #MHD_stop_daemon while
1283 * having suspended requests (this will at least create memory and 1289 * having suspended requests (this will at least create memory and