@@ -171,7 +171,7 @@ typedef int(aws_http_on_incoming_header_block_done_fn)(
171171 * The data must be copied immediately if you wish to preserve it.
172172 * This is always invoked on the HTTP connection's event-loop thread.
173173 *
174- * Note that, if the stream is using manual_window_management then the window
174+ * Note that, if the connection is using manual_window_management then the window
175175 * size has shrunk by the amount of body data received. If the window size
176176 * reaches 0 no further data will be received. Increment the window size with
177177 * aws_http_stream_update_window().
@@ -243,17 +243,6 @@ struct aws_http_make_request_options {
243243 * See `aws_http_on_stream_complete_fn`.
244244 */
245245 aws_http_on_stream_complete_fn * on_complete ;
246-
247- /**
248- * Set to true to manually manage the read window size.
249- *
250- * If this is false, the connection will maintain a constant window size.
251- *
252- * If this is true, the caller must manually increment the window size using aws_http_stream_update_window().
253- * If the window is not incremented, it will shrink by the amount of body data received. If the window size
254- * reaches 0, no further data will be received.
255- */
256- bool manual_window_management ;
257246};
258247
259248struct aws_http_request_handler_options {
@@ -305,17 +294,6 @@ struct aws_http_request_handler_options {
305294 * See `aws_http_on_stream_complete_fn`.
306295 */
307296 aws_http_on_stream_complete_fn * on_complete ;
308-
309- /**
310- * Set to true to manually manage the read window size.
311- *
312- * If this is false, the connection will maintain a constant window size.
313- *
314- * If this is true, the caller must manually increment the window size using aws_http_stream_update_window().
315- * If the window is not incremented, it will shrink by the amount of body data received. If the window size
316- * reaches 0, no further data will be received.
317- */
318- bool manual_window_management ;
319297};
320298
321299#define AWS_HTTP_REQUEST_HANDLER_OPTIONS_INIT \
@@ -634,7 +612,9 @@ int aws_http_message_erase_header(struct aws_http_message *message, size_t index
634612
635613/**
636614 * Create a stream, with a client connection sending a request.
637- * The request starts sending automatically once the stream is created.
615+ * The request does not start sending automatically once the stream is created. You must call
616+ * aws_http_stream_activate to begin execution of the request.
617+ *
638618 * The `options` are copied during this call.
639619 *
640620 * Tip for language bindings: Do not bind the `options` struct. Use something more natural for your language,
@@ -664,6 +644,13 @@ struct aws_http_stream *aws_http_stream_new_server_request_handler(
664644AWS_HTTP_API
665645void aws_http_stream_release (struct aws_http_stream * stream );
666646
647+ /**
648+ * Only used for client initiated streams (immediately following a call to aws_http_connection_make_request).
649+ *
650+ * Activates the request's outgoing stream processing.
651+ */
652+ AWS_HTTP_API int aws_http_stream_activate (struct aws_http_stream * stream );
653+
667654AWS_HTTP_API
668655struct aws_http_connection * aws_http_stream_get_connection (const struct aws_http_stream * stream );
669656
@@ -697,7 +684,8 @@ void aws_http_stream_update_window(struct aws_http_stream *stream, size_t increm
697684
698685/**
699686 * Gets the Http/2 id associated with a stream. Even h1 streams have an id (using the same allocation procedure
700- * as http/2) for easier tracking purposes.
687+ * as http/2) for easier tracking purposes. For client streams, this will only be non-zero after a successful call
688+ * to aws_http_stream_activate()
701689 */
702690uint32_t aws_http_stream_get_id (struct aws_http_stream * stream );
703691
0 commit comments