LibAwsHTTP
Documentation for LibAwsHTTP.
LibAwsHTTP.AWS_C_HTTP_PACKAGE_IDLibAwsHTTP.AWS_HTTP2_DEFAULT_MAX_CLOSED_STREAMSLibAwsHTTP.AWS_HTTP2_PING_DATA_SIZELibAwsHTTP.AWS_HTTP2_SETTINGS_COUNTLibAwsHTTP.AWS_WEBSOCKET_CLOSE_TIMEOUTLibAwsHTTP.AWS_WEBSOCKET_MAX_HANDSHAKE_KEY_LENGTHLibAwsHTTP.AWS_WEBSOCKET_MAX_PAYLOAD_LENGTHLibAwsHTTP.aws_crt_http_statistics_categoryLibAwsHTTP.aws_crt_statistics_http1_channelLibAwsHTTP.aws_crt_statistics_http2_channelLibAwsHTTP.aws_future_http_messageLibAwsHTTP.aws_http1_chunk_extensionLibAwsHTTP.aws_http1_chunk_optionsLibAwsHTTP.aws_http1_connection_optionsLibAwsHTTP.aws_http1_stream_write_chunk_complete_fnLibAwsHTTP.aws_http2_connection_optionsLibAwsHTTP.aws_http2_error_codeLibAwsHTTP.aws_http2_on_change_settings_complete_fnLibAwsHTTP.aws_http2_on_goaway_received_fnLibAwsHTTP.aws_http2_on_ping_complete_fnLibAwsHTTP.aws_http2_on_remote_settings_change_fnLibAwsHTTP.aws_http2_settingLibAwsHTTP.aws_http2_settings_idLibAwsHTTP.aws_http2_stream_managerLibAwsHTTP.aws_http2_stream_manager_acquire_stream_optionsLibAwsHTTP.aws_http2_stream_manager_on_stream_acquired_fnLibAwsHTTP.aws_http2_stream_manager_optionsLibAwsHTTP.aws_http2_stream_manager_shutdown_complete_fnLibAwsHTTP.aws_http2_stream_write_data_complete_fnLibAwsHTTP.aws_http2_stream_write_data_optionsLibAwsHTTP.aws_http_client_connection_optionsLibAwsHTTP.aws_http_connectionLibAwsHTTP.aws_http_connection_managerLibAwsHTTP.aws_http_connection_manager_on_connection_setup_fnLibAwsHTTP.aws_http_connection_manager_optionsLibAwsHTTP.aws_http_connection_manager_shutdown_complete_fnLibAwsHTTP.aws_http_connection_monitoring_optionsLibAwsHTTP.aws_http_errorsLibAwsHTTP.aws_http_headerLibAwsHTTP.aws_http_header_blockLibAwsHTTP.aws_http_header_compressionLibAwsHTTP.aws_http_headersLibAwsHTTP.aws_http_log_subjectLibAwsHTTP.aws_http_make_request_optionsLibAwsHTTP.aws_http_manager_metricsLibAwsHTTP.aws_http_messageLibAwsHTTP.aws_http_message_transform_complete_fnLibAwsHTTP.aws_http_message_transform_fnLibAwsHTTP.aws_http_on_client_connection_setup_fnLibAwsHTTP.aws_http_on_client_connection_shutdown_fnLibAwsHTTP.aws_http_on_incoming_body_fnLibAwsHTTP.aws_http_on_incoming_header_block_done_fnLibAwsHTTP.aws_http_on_incoming_headers_fnLibAwsHTTP.aws_http_on_incoming_request_done_fnLibAwsHTTP.aws_http_on_incoming_request_fnLibAwsHTTP.aws_http_on_server_connection_shutdown_fnLibAwsHTTP.aws_http_on_stream_complete_fnLibAwsHTTP.aws_http_on_stream_destroy_fnLibAwsHTTP.aws_http_on_stream_metrics_fnLibAwsHTTP.aws_http_proxy_authentication_typeLibAwsHTTP.aws_http_proxy_configLibAwsHTTP.aws_http_proxy_connection_typeLibAwsHTTP.aws_http_proxy_env_var_typeLibAwsHTTP.aws_http_proxy_negotiation_connect_on_incoming_headers_fnLibAwsHTTP.aws_http_proxy_negotiation_get_challenge_token_sync_fnLibAwsHTTP.aws_http_proxy_negotiation_get_token_sync_fnLibAwsHTTP.aws_http_proxy_negotiation_http_request_forward_fnLibAwsHTTP.aws_http_proxy_negotiation_http_request_transform_async_fnLibAwsHTTP.aws_http_proxy_negotiation_http_request_transform_fnLibAwsHTTP.aws_http_proxy_negotiation_retry_directiveLibAwsHTTP.aws_http_proxy_negotiation_terminate_fnLibAwsHTTP.aws_http_proxy_negotiatorLibAwsHTTP.aws_http_proxy_negotiator_connect_on_incoming_body_fnLibAwsHTTP.aws_http_proxy_negotiator_connect_status_fnLibAwsHTTP.aws_http_proxy_negotiator_forwarding_vtableLibAwsHTTP.aws_http_proxy_negotiator_get_retry_directive_fnLibAwsHTTP.aws_http_proxy_negotiator_tunnelling_vtableLibAwsHTTP.aws_http_proxy_optionsLibAwsHTTP.aws_http_proxy_strategyLibAwsHTTP.aws_http_proxy_strategy_basic_auth_optionsLibAwsHTTP.aws_http_proxy_strategy_create_negotiator_fnLibAwsHTTP.aws_http_proxy_strategy_tunneling_adaptive_optionsLibAwsHTTP.aws_http_proxy_strategy_tunneling_kerberos_optionsLibAwsHTTP.aws_http_proxy_strategy_tunneling_ntlm_optionsLibAwsHTTP.aws_http_proxy_strategy_tunneling_sequence_optionsLibAwsHTTP.aws_http_proxy_strategy_vtableLibAwsHTTP.aws_http_request_handler_optionsLibAwsHTTP.aws_http_serverLibAwsHTTP.aws_http_server_connection_optionsLibAwsHTTP.aws_http_server_on_destroy_fnLibAwsHTTP.aws_http_server_on_incoming_connection_fnLibAwsHTTP.aws_http_server_optionsLibAwsHTTP.aws_http_statistics_observer_fnLibAwsHTTP.aws_http_status_codeLibAwsHTTP.aws_http_streamLibAwsHTTP.aws_http_stream_metricsLibAwsHTTP.aws_http_stream_write_complete_fnLibAwsHTTP.aws_http_versionLibAwsHTTP.aws_websocketLibAwsHTTP.aws_websocket_client_connection_optionsLibAwsHTTP.aws_websocket_incoming_frameLibAwsHTTP.aws_websocket_on_connection_setup_dataLibAwsHTTP.aws_websocket_on_connection_setup_fnLibAwsHTTP.aws_websocket_on_connection_shutdown_fnLibAwsHTTP.aws_websocket_on_incoming_frame_begin_fnLibAwsHTTP.aws_websocket_on_incoming_frame_complete_fnLibAwsHTTP.aws_websocket_on_incoming_frame_payload_fnLibAwsHTTP.aws_websocket_opcodeLibAwsHTTP.aws_websocket_outgoing_frame_complete_fnLibAwsHTTP.aws_websocket_send_frame_optionsLibAwsHTTP.aws_websocket_stream_outgoing_payload_fnLibAwsHTTP.proxy_env_var_settingsLibAwsHTTP.union (unnamed at /home/runner/.julia/artifacts/bd33d9c370c77e08f2b316b8fe32d1d4f63c7e97/include/aws/http/proxy.h:310:5)LibAwsHTTP.aws_crt_statistics_http1_channel_cleanupLibAwsHTTP.aws_crt_statistics_http1_channel_initLibAwsHTTP.aws_crt_statistics_http1_channel_resetLibAwsHTTP.aws_crt_statistics_http2_channel_initLibAwsHTTP.aws_crt_statistics_http2_channel_resetLibAwsHTTP.aws_future_http_message_acquireLibAwsHTTP.aws_future_http_message_get_errorLibAwsHTTP.aws_future_http_message_get_result_by_moveLibAwsHTTP.aws_future_http_message_is_doneLibAwsHTTP.aws_future_http_message_newLibAwsHTTP.aws_future_http_message_peek_resultLibAwsHTTP.aws_future_http_message_register_callbackLibAwsHTTP.aws_future_http_message_register_callback_if_not_doneLibAwsHTTP.aws_future_http_message_register_channel_callbackLibAwsHTTP.aws_future_http_message_register_event_loop_callbackLibAwsHTTP.aws_future_http_message_releaseLibAwsHTTP.aws_future_http_message_set_errorLibAwsHTTP.aws_future_http_message_set_result_by_moveLibAwsHTTP.aws_future_http_message_waitLibAwsHTTP.aws_http1_stream_add_chunked_trailerLibAwsHTTP.aws_http1_stream_write_chunkLibAwsHTTP.aws_http2_connection_change_settingsLibAwsHTTP.aws_http2_connection_get_local_settingsLibAwsHTTP.aws_http2_connection_get_received_goawayLibAwsHTTP.aws_http2_connection_get_remote_settingsLibAwsHTTP.aws_http2_connection_get_sent_goawayLibAwsHTTP.aws_http2_connection_pingLibAwsHTTP.aws_http2_connection_send_goawayLibAwsHTTP.aws_http2_connection_update_windowLibAwsHTTP.aws_http2_headers_get_request_authorityLibAwsHTTP.aws_http2_headers_get_request_methodLibAwsHTTP.aws_http2_headers_get_request_pathLibAwsHTTP.aws_http2_headers_get_request_schemeLibAwsHTTP.aws_http2_headers_get_response_statusLibAwsHTTP.aws_http2_headers_set_request_authorityLibAwsHTTP.aws_http2_headers_set_request_methodLibAwsHTTP.aws_http2_headers_set_request_pathLibAwsHTTP.aws_http2_headers_set_request_schemeLibAwsHTTP.aws_http2_headers_set_response_statusLibAwsHTTP.aws_http2_message_new_from_http1LibAwsHTTP.aws_http2_message_new_requestLibAwsHTTP.aws_http2_message_new_responseLibAwsHTTP.aws_http2_stream_get_received_reset_error_codeLibAwsHTTP.aws_http2_stream_get_sent_reset_error_codeLibAwsHTTP.aws_http2_stream_manager_acquireLibAwsHTTP.aws_http2_stream_manager_acquire_streamLibAwsHTTP.aws_http2_stream_manager_fetch_metricsLibAwsHTTP.aws_http2_stream_manager_newLibAwsHTTP.aws_http2_stream_manager_releaseLibAwsHTTP.aws_http2_stream_resetLibAwsHTTP.aws_http2_stream_write_dataLibAwsHTTP.aws_http_alpn_map_initLibAwsHTTP.aws_http_alpn_map_init_copyLibAwsHTTP.aws_http_client_connectLibAwsHTTP.aws_http_connection_closeLibAwsHTTP.aws_http_connection_configure_serverLibAwsHTTP.aws_http_connection_get_channelLibAwsHTTP.aws_http_connection_get_remote_endpointLibAwsHTTP.aws_http_connection_get_versionLibAwsHTTP.aws_http_connection_is_clientLibAwsHTTP.aws_http_connection_is_openLibAwsHTTP.aws_http_connection_is_serverLibAwsHTTP.aws_http_connection_make_requestLibAwsHTTP.aws_http_connection_manager_acquireLibAwsHTTP.aws_http_connection_manager_acquire_connectionLibAwsHTTP.aws_http_connection_manager_fetch_metricsLibAwsHTTP.aws_http_connection_manager_newLibAwsHTTP.aws_http_connection_manager_releaseLibAwsHTTP.aws_http_connection_manager_release_connectionLibAwsHTTP.aws_http_connection_new_requests_allowedLibAwsHTTP.aws_http_connection_releaseLibAwsHTTP.aws_http_connection_stop_new_requestsLibAwsHTTP.aws_http_header_name_eqLibAwsHTTP.aws_http_headers_acquireLibAwsHTTP.aws_http_headers_addLibAwsHTTP.aws_http_headers_add_arrayLibAwsHTTP.aws_http_headers_add_headerLibAwsHTTP.aws_http_headers_clearLibAwsHTTP.aws_http_headers_countLibAwsHTTP.aws_http_headers_eraseLibAwsHTTP.aws_http_headers_erase_indexLibAwsHTTP.aws_http_headers_erase_valueLibAwsHTTP.aws_http_headers_getLibAwsHTTP.aws_http_headers_get_allLibAwsHTTP.aws_http_headers_get_indexLibAwsHTTP.aws_http_headers_hasLibAwsHTTP.aws_http_headers_newLibAwsHTTP.aws_http_headers_releaseLibAwsHTTP.aws_http_headers_setLibAwsHTTP.aws_http_library_clean_upLibAwsHTTP.aws_http_library_initLibAwsHTTP.aws_http_message_acquireLibAwsHTTP.aws_http_message_add_headerLibAwsHTTP.aws_http_message_add_header_arrayLibAwsHTTP.aws_http_message_destroyLibAwsHTTP.aws_http_message_erase_headerLibAwsHTTP.aws_http_message_get_body_streamLibAwsHTTP.aws_http_message_get_const_headersLibAwsHTTP.aws_http_message_get_headerLibAwsHTTP.aws_http_message_get_header_countLibAwsHTTP.aws_http_message_get_headersLibAwsHTTP.aws_http_message_get_protocol_versionLibAwsHTTP.aws_http_message_get_request_methodLibAwsHTTP.aws_http_message_get_request_pathLibAwsHTTP.aws_http_message_get_response_statusLibAwsHTTP.aws_http_message_is_requestLibAwsHTTP.aws_http_message_is_responseLibAwsHTTP.aws_http_message_new_requestLibAwsHTTP.aws_http_message_new_request_with_headersLibAwsHTTP.aws_http_message_new_responseLibAwsHTTP.aws_http_message_new_websocket_handshake_requestLibAwsHTTP.aws_http_message_releaseLibAwsHTTP.aws_http_message_set_body_streamLibAwsHTTP.aws_http_message_set_request_methodLibAwsHTTP.aws_http_message_set_request_pathLibAwsHTTP.aws_http_message_set_response_statusLibAwsHTTP.aws_http_options_validate_proxy_configurationLibAwsHTTP.aws_http_proxy_config_destroyLibAwsHTTP.aws_http_proxy_config_new_cloneLibAwsHTTP.aws_http_proxy_config_new_from_connection_optionsLibAwsHTTP.aws_http_proxy_config_new_from_manager_optionsLibAwsHTTP.aws_http_proxy_config_new_from_proxy_optionsLibAwsHTTP.aws_http_proxy_config_new_from_proxy_options_with_tls_infoLibAwsHTTP.aws_http_proxy_config_new_tunneling_from_proxy_optionsLibAwsHTTP.aws_http_proxy_negotiator_acquireLibAwsHTTP.aws_http_proxy_negotiator_releaseLibAwsHTTP.aws_http_proxy_new_socket_channelLibAwsHTTP.aws_http_proxy_options_init_from_configLibAwsHTTP.aws_http_proxy_strategy_acquireLibAwsHTTP.aws_http_proxy_strategy_create_negotiatorLibAwsHTTP.aws_http_proxy_strategy_new_basic_authLibAwsHTTP.aws_http_proxy_strategy_new_tunneling_adaptiveLibAwsHTTP.aws_http_proxy_strategy_releaseLibAwsHTTP.aws_http_server_get_listener_endpointLibAwsHTTP.aws_http_server_newLibAwsHTTP.aws_http_server_releaseLibAwsHTTP.aws_http_status_textLibAwsHTTP.aws_http_stream_acquireLibAwsHTTP.aws_http_stream_activateLibAwsHTTP.aws_http_stream_cancelLibAwsHTTP.aws_http_stream_get_connectionLibAwsHTTP.aws_http_stream_get_idLibAwsHTTP.aws_http_stream_get_incoming_request_methodLibAwsHTTP.aws_http_stream_get_incoming_request_uriLibAwsHTTP.aws_http_stream_get_incoming_response_statusLibAwsHTTP.aws_http_stream_new_server_request_handlerLibAwsHTTP.aws_http_stream_releaseLibAwsHTTP.aws_http_stream_send_responseLibAwsHTTP.aws_http_stream_update_windowLibAwsHTTP.aws_websocket_acquireLibAwsHTTP.aws_websocket_client_connectLibAwsHTTP.aws_websocket_closeLibAwsHTTP.aws_websocket_convert_to_midchannel_handlerLibAwsHTTP.aws_websocket_get_channelLibAwsHTTP.aws_websocket_increment_read_windowLibAwsHTTP.aws_websocket_is_data_frameLibAwsHTTP.aws_websocket_random_handshake_keyLibAwsHTTP.aws_websocket_releaseLibAwsHTTP.aws_websocket_send_frame
LibAwsHTTP.AWS_C_HTTP_PACKAGE_ID — Constant
Documentation not found.
LibAwsHTTP.AWS_HTTP2_DEFAULT_MAX_CLOSED_STREAMS — Constant
Documentation not found.
LibAwsHTTP.AWS_HTTP2_PING_DATA_SIZE — Constant
Documentation not found.
LibAwsHTTP.AWS_HTTP2_SETTINGS_COUNT — Constant
Documentation not found.
LibAwsHTTP.AWS_WEBSOCKET_CLOSE_TIMEOUT — Constant
Documentation not found.
LibAwsHTTP.AWS_WEBSOCKET_MAX_HANDSHAKE_KEY_LENGTH — Constant
Documentation not found.
LibAwsHTTP.AWS_WEBSOCKET_MAX_PAYLOAD_LENGTH — Constant
Documentation not found.
LibAwsHTTP.aws_crt_http_statistics_category — Type
aws_crt_http_statistics_categoryDocumentation not found.
LibAwsHTTP.aws_crt_statistics_http1_channel — Type
aws_crt_statistics_http1_channelA statistics struct for http handlers. Tracks the actual amount of time that incoming and outgoing requests are waiting for their IO to complete.
LibAwsHTTP.aws_crt_statistics_http2_channel — Type
aws_crt_statistics_http2_channelDocumentation not found.
LibAwsHTTP.aws_future_http_message — Type
Documentation not found.
LibAwsHTTP.aws_http1_chunk_extension — Type
aws_http1_chunk_extensionHTTP/1.1 chunk extension for chunked encoding. Note that the underlying strings are not owned by the byte cursors.
LibAwsHTTP.aws_http1_chunk_options — Type
aws_http1_chunk_optionsEncoding options for an HTTP/1.1 chunked transfer encoding chunk.
LibAwsHTTP.aws_http1_connection_options — Type
aws_http1_connection_optionsOptions specific to HTTP/1.x connections.
LibAwsHTTP.aws_http1_stream_write_chunk_complete_fn — Type
Invoked when the data of an outgoing HTTP/1.1 chunk is no longer in use. This is always invoked on the HTTP connection's event-loop thread.
Arguments
stream: HTTP-stream this chunk was submitted to.error_code: If error_code is AWS_ERROR_SUCCESS (0), the data was successfully sent. Any other error_code indicates that the HTTP-stream is in the process of terminating. If the error_code is AWS_ERROR_HTTP_STREAM_HAS_COMPLETED, the stream's termination has nothing to do with this chunk. Any other non-zero error code indicates a problem with this particular chunk's data.user_data: User data for this chunk.
LibAwsHTTP.aws_http2_connection_options — Type
aws_http2_connection_optionsOptions specific to HTTP/2 connections.
LibAwsHTTP.aws_http2_error_code — Type
aws_http2_error_codeDocumentation not found.
LibAwsHTTP.aws_http2_on_change_settings_complete_fn — Type
Invoked when the HTTP/2 settings change is complete. If connection setup successfully this will always be invoked whether settings change successfully or unsuccessfully. If error_code is AWS_ERROR_SUCCESS (0), then the peer has acknowledged the settings and the change has been applied. If error_code is non-zero, then a connection error occurred before the settings could be fully acknowledged and applied. This is always invoked on the connection's event-loop thread.
LibAwsHTTP.aws_http2_on_goaway_received_fn — Type
Invoked when an HTTP/2 GOAWAY frame is received from peer. Implies that the peer has initiated shutdown, or encountered a serious error. Once a GOAWAY is received, no further streams may be created on this connection.
Arguments
http2_connection: This HTTP/2 connection.last_stream_id: ID of the last locally-initiated stream that peer will process. Any locally-initiated streams with a higher ID are ignored by peer, and are safe to retry on another connection.http2_error_code: The HTTP/2 error code (RFC-7540 section 7) sent by peer.enum [awshttp2error_code](@ref)lists official codes.debug_data: The debug data sent by peer. It can be empty. (NOTE: this data is only valid for the lifetime of the callback. Make a deep copy if you wish to keep it longer.)user_data: User-data passed to the callback.
LibAwsHTTP.aws_http2_on_ping_complete_fn — Type
Invoked when the HTTP/2 PING completes, whether peer has acknowledged it or not. If error_code is AWS_ERROR_SUCCESS (0), then the peer has acknowledged the PING and round_trip_time_ns will be the round trip time in nano seconds for the connection. If error_code is non-zero, then a connection error occurred before the PING get acknowledgment and round_trip_time_ns will be useless in this case.
LibAwsHTTP.aws_http2_on_remote_settings_change_fn — Type
Invoked when new HTTP/2 settings from peer have been applied. Settings_array is the array of aws_http2_settings that contains all the settings we just changed in the order we applied (the order settings arrived). Num_settings is the number of elements in that array.
LibAwsHTTP.aws_http2_setting — Type
aws_http2_settingDocumentation not found.
LibAwsHTTP.aws_http2_settings_id — Type
aws_http2_settings_idDocumentation not found.
LibAwsHTTP.aws_http2_stream_manager — Type
Documentation not found.
LibAwsHTTP.aws_http2_stream_manager_acquire_stream_options — Type
aws_http2_stream_manager_acquire_stream_optionsDocumentation not found.
LibAwsHTTP.aws_http2_stream_manager_on_stream_acquired_fn — Type
Always invoked asynchronously when the stream was created, successfully or not. When stream is NULL, error code will be set to indicate what happened. If there is a stream returned, you own the stream completely. Invoked on the same thread as other callback of the stream, which will be the thread of the connection, ideally. If there is no connection made, the callback will be invoked from a sperate thread.
LibAwsHTTP.aws_http2_stream_manager_options — Type
aws_http2_stream_manager_optionsHTTP/2 stream manager configuration struct.
Contains all of the configuration needed to create an http2 connection as well as connection manager under the hood.
LibAwsHTTP.aws_http2_stream_manager_shutdown_complete_fn — Type
Invoked asynchronously when the stream manager has been shutdown completely. Never invoked when aws_http2_stream_manager_new failed.
LibAwsHTTP.aws_http2_stream_write_data_complete_fn — Type
Invoked when the data of an outgoing HTTP2 data frame is no longer in use. This is always invoked on the HTTP connection's event-loop thread.
Arguments
stream: HTTP2-stream this write was submitted to.error_code: If error_code is AWS_ERROR_SUCCESS (0), the data was successfully sent. Any other error_code indicates that the HTTP-stream is in the process of terminating. If the error_code is AWS_ERROR_HTTP_STREAM_HAS_COMPLETED, the stream's termination has nothing to do with this write. Any other non-zero error code indicates a problem with this particular write's data.user_data: User data for this write.
LibAwsHTTP.aws_http2_stream_write_data_options — Type
aws_http2_stream_write_data_optionsEncoding options for manual H2 data frame writes
LibAwsHTTP.aws_http_client_connection_options — Type
aws_http_client_connection_optionsOptions for creating an HTTP client connection. Initialize with AWS_HTTP_CLIENT_CONNECTION_OPTIONS_INIT to set default values.
LibAwsHTTP.aws_http_connection — Type
Documentation not found.
LibAwsHTTP.aws_http_connection_manager — Type
Documentation not found.
LibAwsHTTP.aws_http_connection_manager_on_connection_setup_fn — Type
Documentation not found.
LibAwsHTTP.aws_http_connection_manager_options — Type
aws_http_connection_manager_optionsDocumentation not found.
LibAwsHTTP.aws_http_connection_manager_shutdown_complete_fn — Type
Documentation not found.
LibAwsHTTP.aws_http_connection_monitoring_options — Type
aws_http_connection_monitoring_optionsConfiguration options for connection monitoring
LibAwsHTTP.aws_http_errors — Type
aws_http_errorsDocumentation not found.
LibAwsHTTP.aws_http_header — Type
aws_http_headerA lightweight HTTP header struct. Note that the underlying strings are not owned by the byte cursors.
LibAwsHTTP.aws_http_header_block — Type
aws_http_header_blockHeader block type. INFORMATIONAL: Header block for 1xx informational (interim) responses. MAIN: Main header block sent with request or response. TRAILING: Headers sent after the body of a request or response.
LibAwsHTTP.aws_http_header_compression — Type
aws_http_header_compressionControls whether a header's strings may be compressed by encoding the index of strings in a cache, rather than encoding the literal string.
This setting has no effect on HTTP/1.x connections. On HTTP/2 connections this controls HPACK behavior. See RFC-7541 Section 7.1 for security considerations.
LibAwsHTTP.aws_http_headers — Type
A transformable block of HTTP headers. Provides a nice API for getting/setting header names and values.
All strings are copied and stored within this datastructure. The index of a given header may change any time headers are modified. When iterating headers, the following ordering rules apply:
Headers with the same name will always be in the same order, relative to one another. If "A: one" is added before "A: two", then "A: one" will always precede "A: two".
Headers with different names could be in any order, relative to one another. If "A: one" is seen before "B: bee" in one iteration, you might see "B: bee" before "A: one" on the next.
LibAwsHTTP.aws_http_log_subject — Type
aws_http_log_subjectDocumentation not found.
LibAwsHTTP.aws_http_make_request_options — Type
aws_http_make_request_optionsOptions for creating a stream which sends a request from the client and receives a response from the server.
LibAwsHTTP.aws_http_manager_metrics — Type
aws_http_manager_metricsMetrics for logging and debugging purpose.
LibAwsHTTP.aws_http_message — Type
Documentation not found.
LibAwsHTTP.aws_http_message_transform_complete_fn — Type
Function to invoke when a message transformation completes. This function MUST be invoked or the application will soft-lock. message and complete_ctx must be the same pointers provided to the aws_http_message_transform_fn. error_code should should be AWS_ERROR_SUCCESS if transformation was successful, otherwise pass a different AWS_ERROR_X value.
LibAwsHTTP.aws_http_message_transform_fn — Type
A function that may modify a request or response before it is sent. The transformation may be asynchronous or immediate. The user MUST invoke the complete_fn when transformation is complete or the application will soft-lock. When invoking the complete_fn, pass along the message and complete_ctx provided here and an error code. The error code should be AWS_ERROR_SUCCESS if transformation was successful, otherwise pass a different AWS_ERROR_X value.
LibAwsHTTP.aws_http_on_client_connection_setup_fn — Type
Invoked when connect completes.
If unsuccessful, error_code will be set, connection will be NULL, and the on_shutdown callback will never be invoked.
If successful, error_code will be 0 and connection will be valid. The user is now responsible for the connection and must call aws_http_connection_release() when they are done with it.
The connection uses one event-loop thread to do all its work. The thread invoking this callback will be the same thread that invokes all future callbacks for this connection and its streams.
LibAwsHTTP.aws_http_on_client_connection_shutdown_fn — Type
Invoked when the connection has finished shutting down. Never invoked if on_setup failed. This is always invoked on connection's event-loop thread. Note that the connection is not completely done until on_shutdown has been invoked AND aws_http_connection_release() has been called.
LibAwsHTTP.aws_http_on_incoming_body_fn — Type
Called repeatedly as body data is received. The data must be copied immediately if you wish to preserve it. This is always invoked on the HTTP connection's event-loop thread.
Note that, if the connection is using manual_window_management then the window size has shrunk by the amount of body data received. If the window size reaches 0 no further data will be received. Increment the window size with aws_http_stream_update_window().
Return AWS_OP_SUCCESS to continue processing the stream. Return aws_raise_error(E) to indicate failure and cancel the stream. The error you raise will be reflected in the error_code passed to the on_complete callback.
LibAwsHTTP.aws_http_on_incoming_header_block_done_fn — Type
Invoked when the incoming header block of this type(informational/main/trailing) has been completely read. This is always invoked on the HTTP connection's event-loop thread.
Return AWS_OP_SUCCESS to continue processing the stream. Return aws_raise_error(E) to indicate failure and cancel the stream. The error you raise will be reflected in the error_code passed to the on_complete callback.
LibAwsHTTP.aws_http_on_incoming_headers_fn — Type
Invoked repeatedly times as headers are received. At this point, aws_http_stream_get_incoming_response_status() can be called for the client. And aws_http_stream_get_incoming_request_method() and aws_http_stream_get_incoming_request_uri() can be called for the server. This is always invoked on the HTTP connection's event-loop thread.
Return AWS_OP_SUCCESS to continue processing the stream. Return aws_raise_error(E) to indicate failure and cancel the stream. The error you raise will be reflected in the error_code passed to the on_complete callback.
LibAwsHTTP.aws_http_on_incoming_request_done_fn — Type
Invoked when request has been completely read. This is always invoked on the HTTP connection's event-loop thread.
Return AWS_OP_SUCCESS to continue processing the stream. Return aws_raise_error(E) to indicate failure and cancel the stream. The error you raise will be reflected in the error_code passed to the on_complete callback.
LibAwsHTTP.aws_http_on_incoming_request_fn — Type
Invoked at the start of an incoming request. To process the request, the user must create a request handler stream and return it to the connection. If NULL is returned, the request will not be processed and the last error will be reported as the reason for failure.
LibAwsHTTP.aws_http_on_server_connection_shutdown_fn — Type
Documentation not found.
LibAwsHTTP.aws_http_on_stream_complete_fn — Type
Invoked when a request/response stream is complete, whether successful or unsuccessful This is always invoked on the HTTP connection's event-loop thread. This will not be invoked if the stream is never activated.
LibAwsHTTP.aws_http_on_stream_destroy_fn — Type
Invoked when request/response stream destroy completely. This can be invoked within the same thead who release the refcount on http stream. This is invoked even if the stream is never activated.
LibAwsHTTP.aws_http_on_stream_metrics_fn — Type
Invoked right before request/response stream is complete to report the tracing metrics for aws_http_stream. This may be invoked synchronously when aws_http_stream_release() is called. This is invoked even if the stream is never activated. See aws_http_stream_metrics for details.
LibAwsHTTP.aws_http_proxy_authentication_type — Type
aws_http_proxy_authentication_typeLibAwsHTTP.aws_http_proxy_config — Type
Documentation not found.
LibAwsHTTP.aws_http_proxy_connection_type — Type
aws_http_proxy_connection_typeSupported proxy connection types
LibAwsHTTP.aws_http_proxy_env_var_type — Type
aws_http_proxy_env_var_typeDocumentation not found.
LibAwsHTTP.aws_http_proxy_negotiation_connect_on_incoming_headers_fn — Type
Tunneling proxy connections only. A callback that lets the negotiator examine the headers in the response to the most recent CONNECT request as they arrive.
LibAwsHTTP.aws_http_proxy_negotiation_get_challenge_token_sync_fn — Type
Synchronous (for now) callback function to fetch a token used in modifying CONNECT request. Includes a (byte string) context intended to be used as part of a challenge-response flow.
LibAwsHTTP.aws_http_proxy_negotiation_get_token_sync_fn — Type
Synchronous (for now) callback function to fetch a token used in modifying CONNECT requests
LibAwsHTTP.aws_http_proxy_negotiation_http_request_forward_fn — Type
Proxy negotiation logic must call this function to forward the potentially-mutated request back to the proxy connection logic.
LibAwsHTTP.aws_http_proxy_negotiation_http_request_transform_async_fn — Type
User-supplied transform callback which implements the proxy request flow and ultimately, across all execution pathways, invokes either the terminate function or the forward function appropriately.
For tunneling proxy connections, this request flow transform only applies to the CONNECT stage of proxy connection establishment.
For forwarding proxy connections, this request flow transform applies to every single http request that goes out on the connection.
Forwarding proxy connections cannot yet support a truly async request transform without major surgery on http stream creation, so for now, we split into an async version (for tunneling proxies) and a separate synchronous version for forwarding proxies. Also forwarding proxies are a kind of legacy dead-end in some sense.
LibAwsHTTP.aws_http_proxy_negotiation_http_request_transform_fn — Type
Documentation not found.
LibAwsHTTP.aws_http_proxy_negotiation_retry_directive — Type
aws_http_proxy_negotiation_retry_directiveDocumentation not found.
LibAwsHTTP.aws_http_proxy_negotiation_terminate_fn — Type
Proxy negotiation logic must call this function to indicate an unsuccessful outcome
LibAwsHTTP.aws_http_proxy_negotiator — Type
aws_http_proxy_negotiatorDocumentation not found.
LibAwsHTTP.aws_http_proxy_negotiator_connect_on_incoming_body_fn — Type
Tunneling proxy connections only. A callback that lets the negotiator examine the body of the response to the most recent CONNECT request.
LibAwsHTTP.aws_http_proxy_negotiator_connect_status_fn — Type
Tunneling proxy connections only. A callback that lets the negotiator examine the status code of the response to the most recent CONNECT request.
LibAwsHTTP.aws_http_proxy_negotiator_forwarding_vtable — Type
aws_http_proxy_negotiator_forwarding_vtableVtable for forwarding-based proxy negotiators
LibAwsHTTP.aws_http_proxy_negotiator_get_retry_directive_fn — Type
Documentation not found.
LibAwsHTTP.aws_http_proxy_negotiator_tunnelling_vtable — Type
aws_http_proxy_negotiator_tunnelling_vtableVtable for tunneling-based proxy negotiators
LibAwsHTTP.aws_http_proxy_options — Type
aws_http_proxy_optionsOptions for http proxy server usage
LibAwsHTTP.aws_http_proxy_strategy — Type
aws_http_proxy_strategyDocumentation not found.
LibAwsHTTP.aws_http_proxy_strategy_basic_auth_options — Type
aws_http_proxy_strategy_basic_auth_optionsDocumentation not found.
LibAwsHTTP.aws_http_proxy_strategy_tunneling_adaptive_options — Type
aws_http_proxy_strategy_tunneling_adaptive_optionsDocumentation not found.
LibAwsHTTP.aws_http_proxy_strategy_tunneling_kerberos_options — Type
aws_http_proxy_strategy_tunneling_kerberos_optionsDocumentation not found.
LibAwsHTTP.aws_http_proxy_strategy_tunneling_ntlm_options — Type
aws_http_proxy_strategy_tunneling_ntlm_optionsDocumentation not found.
LibAwsHTTP.aws_http_proxy_strategy_tunneling_sequence_options — Type
aws_http_proxy_strategy_tunneling_sequence_optionsDocumentation not found.
LibAwsHTTP.aws_http_proxy_strategy_vtable — Type
aws_http_proxy_strategy_vtableDocumentation not found.
LibAwsHTTP.aws_http_request_handler_options — Type
aws_http_request_handler_optionsDocumentation not found.
LibAwsHTTP.aws_http_server — Type
A listening socket which accepts incoming HTTP connections, creating a server-side aws_http_connection to handle each one.
LibAwsHTTP.aws_http_server_connection_options — Type
aws_http_server_connection_optionsOptions for configuring a server-side aws_http_connection. Initialized with AWS_HTTP_SERVER_CONNECTION_OPTIONS_INIT to set default values.
LibAwsHTTP.aws_http_server_on_destroy_fn — Type
Documentation not found.
LibAwsHTTP.aws_http_server_on_incoming_connection_fn — Type
Documentation not found.
LibAwsHTTP.aws_http_server_options — Type
aws_http_server_optionsOptions for creating an HTTP server. Initialize with AWS_HTTP_SERVER_OPTIONS_INIT to set default values.
LibAwsHTTP.aws_http_statistics_observer_fn — Type
Callback invoked on each statistics sample.
connection_nonce is unique to each connection for disambiguation of each callback per connection.
LibAwsHTTP.aws_http_status_code — Type
aws_http_status_codeCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0.
LibAwsHTTP.aws_http_stream — Type
Documentation not found.
LibAwsHTTP.aws_http_stream_metrics — Type
aws_http_stream_metricsTracing metrics for aws_http_stream. Data maybe not be available if the data of stream was never sent/received before it completes.
LibAwsHTTP.aws_http_stream_write_complete_fn — Type
Invoked when the data stream of an outgoing HTTP write operation is no longer in use. This is always invoked on the HTTP connection's event-loop thread.
Arguments
stream: HTTP-stream this write operation was submitted to.error_code: If error_code is AWS_ERROR_SUCCESS (0), the data was successfully sent. Any other error_code indicates that the HTTP-stream is in the process of terminating. If the error_code is AWS_ERROR_HTTP_STREAM_HAS_COMPLETED, the stream's termination has nothing to do with this write operation. Any other non-zero error code indicates a problem with this particular write operation's data.user_data: User data for this write operation.
LibAwsHTTP.aws_http_version — Type
aws_http_versionDocumentation not found.
LibAwsHTTP.aws_websocket — Type
A websocket connection.
LibAwsHTTP.aws_websocket_client_connection_options — Type
aws_websocket_client_connection_optionsOptions for creating a websocket client connection.
LibAwsHTTP.aws_websocket_incoming_frame — Type
aws_websocket_incoming_frameData about an incoming frame. See RFC-6455 Section 5.2.
LibAwsHTTP.aws_websocket_on_connection_setup_data — Type
aws_websocket_on_connection_setup_dataData passed to the websocket on_connection_setup callback.
An error_code of zero indicates that setup was completely successful. You own the websocket pointer now and must call aws_websocket_release() when you are done with it. You can inspect the response headers, if you're interested.
A non-zero error_code indicates that setup failed. The websocket pointer will be NULL. If the server sent a response, you can inspect its status-code, headers, and body, but this data will NULL if setup failed before a full response could be received. If you wish to persist data from the response make a deep copy. The response data becomes invalid once the callback completes.
LibAwsHTTP.aws_websocket_on_connection_setup_fn — Type
Called when websocket setup is complete. Called exactly once on the websocket's event-loop thread. See aws_websocket_on_connection_setup_data.
LibAwsHTTP.aws_websocket_on_connection_shutdown_fn — Type
Called when the websocket has finished shutting down. Called once on the websocket's event-loop thread if setup succeeded. If setup failed, this is never called.
LibAwsHTTP.aws_websocket_on_incoming_frame_begin_fn — Type
Called when a new frame arrives. Invoked once per frame on the websocket's event-loop thread. Each incoming-frame-begin call will eventually be followed by an incoming-frame-complete call, before the next frame begins and before the websocket shuts down.
Return true to proceed normally. If false is returned, the websocket will read no further data, the frame will complete with an error-code, and the connection will close.
LibAwsHTTP.aws_websocket_on_incoming_frame_complete_fn — Type
Called when done processing an incoming frame. If error_code is non-zero, an error occurred and the payload may not have been completely received. Invoked once per frame on the websocket's event-loop thread.
Return true to proceed normally. If false is returned, the websocket will read no further data and the connection will close.
LibAwsHTTP.aws_websocket_on_incoming_frame_payload_fn — Type
Called repeatedly as payload data arrives. Invoked 0 or more times on the websocket's event-loop thread. Payload data will not be valid after this call, so copy if necessary. The payload data is always unmasked at this point.
NOTE: If you created the websocket with manual_window_management set true, you must maintain the read window. Whenever the read window reaches 0, you will stop receiving anything. The websocket's initial_window_size determines the starting size of the read window. The read window shrinks as you receive the payload from "data" frames (TEXT, BINARY, and CONTINUATION). Use aws_websocket_increment_read_window() to increment the window again and keep frames flowing. Maintain a larger window to keep up high throughput. You only need to worry about the payload from "data" frames. The websocket automatically increments the window to account for any other incoming bytes, including other parts of a frame (opcode, payload-length, etc) and the payload of other frame types (PING, PONG, CLOSE).
Return true to proceed normally. If false is returned, the websocket will read no further data, the frame will complete with an error-code, and the connection will close.
LibAwsHTTP.aws_websocket_opcode — Type
aws_websocket_opcodeOpcode describing the type of a websocket frame. RFC-6455 Section 5.2
LibAwsHTTP.aws_websocket_outgoing_frame_complete_fn — Type
Called when a aws_websocket_send_frame() operation completes. error_code will be zero if the operation was successful. "Success" does not guarantee that the peer actually received or processed the frame. Invoked exactly once per sent frame on the websocket's event-loop thread.
LibAwsHTTP.aws_websocket_send_frame_options — Type
aws_websocket_send_frame_optionsOptions for sending a websocket frame. This structure is copied immediately by aws_websocket_send(). For descriptions of opcode, fin, and payload_length see in RFC-6455 Section 5.2.
LibAwsHTTP.aws_websocket_stream_outgoing_payload_fn — Type
Called repeatedly as the websocket's payload is streamed out. The user should write payload data to out_buf, up to available capacity. The websocket will mask this data for you, if necessary. Invoked repeatedly on the websocket's event-loop thread.
Return true to proceed normally. If false is returned, the websocket will send no further data, the frame will complete with an error-code, and the connection will close.
LibAwsHTTP.proxy_env_var_settings — Type
proxy_env_var_settingsDocumentation not found.
LibAwsHTTP.union (unnamed at /home/runner/.julia/artifacts/bd33d9c370c77e08f2b316b8fe32d1d4f63c7e97/include/aws/http/proxy.h:310:5) — Type
union (unnamed at /home/runner/.julia/artifacts/bd33d9c370c77e08f2b316b8fe32d1d4f63c7e97/include/aws/http/proxy.h:310:5)Documentation not found.
LibAwsHTTP.aws_crt_statistics_http1_channel_cleanup — Method
aws_crt_statistics_http1_channel_cleanup(stats)Cleans up a http channel handler statistics struct
Prototype
void aws_crt_statistics_http1_channel_cleanup(struct aws_crt_statistics_http1_channel *stats);LibAwsHTTP.aws_crt_statistics_http1_channel_init — Method
aws_crt_statistics_http1_channel_init(stats)Initializes a http channel handler statistics struct
Prototype
int aws_crt_statistics_http1_channel_init(struct aws_crt_statistics_http1_channel *stats);LibAwsHTTP.aws_crt_statistics_http1_channel_reset — Method
aws_crt_statistics_http1_channel_reset(stats)Resets a http channel handler statistics struct's statistics
Prototype
void aws_crt_statistics_http1_channel_reset(struct aws_crt_statistics_http1_channel *stats);LibAwsHTTP.aws_crt_statistics_http2_channel_init — Method
aws_crt_statistics_http2_channel_init(stats)Initializes a HTTP/2 channel handler statistics struct
Prototype
void aws_crt_statistics_http2_channel_init(struct aws_crt_statistics_http2_channel *stats);LibAwsHTTP.aws_crt_statistics_http2_channel_reset — Method
aws_crt_statistics_http2_channel_reset(stats)Resets a HTTP/2 channel handler statistics struct's statistics
Prototype
void aws_crt_statistics_http2_channel_reset(struct aws_crt_statistics_http2_channel *stats);LibAwsHTTP.aws_future_http_message_acquire — Method
aws_future_http_message_acquire(future)Documentation not found.
Prototype
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);LibAwsHTTP.aws_future_http_message_get_error — Method
aws_future_http_message_get_error(future)Documentation not found.
Prototype
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);LibAwsHTTP.aws_future_http_message_get_result_by_move — Method
aws_future_http_message_get_result_by_move(future)Documentation not found.
Prototype
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);LibAwsHTTP.aws_future_http_message_is_done — Method
aws_future_http_message_is_done(future)Documentation not found.
Prototype
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);LibAwsHTTP.aws_future_http_message_new — Method
aws_future_http_message_new(alloc)Documentation not found.
Prototype
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);LibAwsHTTP.aws_future_http_message_peek_result — Method
aws_future_http_message_peek_result(future)Documentation not found.
Prototype
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);LibAwsHTTP.aws_future_http_message_register_callback — Method
aws_future_http_message_register_callback(future, on_done, user_data)Documentation not found.
Prototype
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);LibAwsHTTP.aws_future_http_message_register_callback_if_not_done — Method
aws_future_http_message_register_callback_if_not_done(future, on_done, user_data)Documentation not found.
Prototype
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);LibAwsHTTP.aws_future_http_message_register_channel_callback — Method
aws_future_http_message_register_channel_callback(future, channel, on_done, user_data)Documentation not found.
Prototype
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);LibAwsHTTP.aws_future_http_message_register_event_loop_callback — Method
aws_future_http_message_register_event_loop_callback(future, event_loop, on_done, user_data)Documentation not found.
Prototype
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);LibAwsHTTP.aws_future_http_message_release — Method
aws_future_http_message_release(future)Documentation not found.
Prototype
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);LibAwsHTTP.aws_future_http_message_set_error — Method
aws_future_http_message_set_error(future, error_code)Documentation not found.
Prototype
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);LibAwsHTTP.aws_future_http_message_set_result_by_move — Method
aws_future_http_message_set_result_by_move(future, pointer_address)Documentation not found.
Prototype
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);LibAwsHTTP.aws_future_http_message_wait — Method
aws_future_http_message_wait(future, timeout_ns)Documentation not found.
Prototype
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);LibAwsHTTP.aws_http1_stream_add_chunked_trailer — Method
aws_http1_stream_add_chunked_trailer(http1_stream, trailing_headers)Add a list of headers to be added as trailing headers sent after the last chunk is sent. a "Trailer" header field which indicates the fields present in the trailer.
Certain headers are forbidden in the trailer (e.g., Transfer-Encoding, Content-Length, Host). See RFC-7541 Section 4.1.2 for more details.
For client streams, activate() must be called before any chunks are submitted.
For server streams, the response must be submitted before the trailer can be added
aws_http1_stream_add_chunked_trailer must be called before the final size 0 chunk, and at the moment can only be called once, though this could change if need be.
Returns AWS_OP_SUCCESS if the chunk has been submitted.
Prototype
int aws_http1_stream_add_chunked_trailer( struct aws_http_stream *http1_stream, const struct aws_http_headers *trailing_headers);LibAwsHTTP.aws_http1_stream_write_chunk — Method
aws_http1_stream_write_chunk(http1_stream, options)Submit a chunk of data to be sent on an HTTP/1.1 stream. The stream must have specified "chunked" in a "transfer-encoding" header, and the aws_http_message must NOT have any body stream set. For client streams, activate() must be called before any chunks are submitted. For server streams, the response must be submitted before any chunks. A final chunk with size 0 must be submitted to successfully complete the HTTP-stream.
Returns AWS_OP_SUCCESS if the chunk has been submitted. The chunk's completion callback will be invoked when the HTTP-stream is done with the chunk data, whether or not it was successfully sent (see aws_http1_stream_write_chunk_complete_fn). The chunk data must remain valid until the completion callback is invoked.
Returns AWS_OP_ERR and raises an error if the chunk could not be submitted. In this case, the chunk's completion callback will never be invoked. Note that it is always possible for the HTTP-stream to terminate unexpectedly prior to this call being made, in which case the error raised is AWS_ERROR_HTTP_STREAM_HAS_COMPLETED.
Prototype
int aws_http1_stream_write_chunk( struct aws_http_stream *http1_stream, const struct aws_http1_chunk_options *options);LibAwsHTTP.aws_http2_connection_change_settings — Method
aws_http2_connection_change_settings(http2_connection, settings_array, num_settings, on_completed, user_data)Send a SETTINGS frame (HTTP/2 only). SETTINGS will be applied locally when SETTINGS ACK is received from peer.
Arguments
http2_connection: HTTP/2 connection.settings_array: The array of settings to change. Note: each setting has its boundary.num_settings: The num of settings to change in settings_array.on_completed: Optional callback, seeaws_http2_on_change_settings_complete_fn.user_data: User-data pass to on_completed callback.
Prototype
int aws_http2_connection_change_settings( struct aws_http_connection *http2_connection, const struct aws_http2_setting *settings_array, size_t num_settings, aws_http2_on_change_settings_complete_fn *on_completed, void *user_data);LibAwsHTTP.aws_http2_connection_get_local_settings — Method
aws_http2_connection_get_local_settings(http2_connection, out_settings)Get the local settings we are using to affect the decoding.
Arguments
http2_connection: HTTP/2 connection.out_settings: fixed size array ofaws_http2_settinggets set to the local settings
Prototype
void aws_http2_connection_get_local_settings( const struct aws_http_connection *http2_connection, struct aws_http2_setting out_settings[AWS_HTTP2_SETTINGS_COUNT]);LibAwsHTTP.aws_http2_connection_get_received_goaway — Method
aws_http2_connection_get_received_goaway(http2_connection, out_http2_error, out_last_stream_id)Get data about the latest GOAWAY frame received from peer (HTTP/2 only). If no GOAWAY has been received, or the GOAWAY payload is still in transmitting, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE will be raised.
Arguments
http2_connection: HTTP/2 connection.out_http2_error: Gets set to HTTP/2 error code received in most recent GOAWAY.out_last_stream_id: Gets set to Last-Stream-ID received in most recent GOAWAY.
Prototype
int aws_http2_connection_get_received_goaway( struct aws_http_connection *http2_connection, uint32_t *out_http2_error, uint32_t *out_last_stream_id);LibAwsHTTP.aws_http2_connection_get_remote_settings — Method
aws_http2_connection_get_remote_settings(http2_connection, out_settings)Get the settings received from remote peer, which we are using to restricts the message to send.
Arguments
http2_connection: HTTP/2 connection.out_settings: fixed size array ofaws_http2_settinggets set to the remote settings
Prototype
void aws_http2_connection_get_remote_settings( const struct aws_http_connection *http2_connection, struct aws_http2_setting out_settings[AWS_HTTP2_SETTINGS_COUNT]);LibAwsHTTP.aws_http2_connection_get_sent_goaway — Method
aws_http2_connection_get_sent_goaway(http2_connection, out_http2_error, out_last_stream_id)Get data about the latest GOAWAY frame sent to peer (HTTP/2 only). If no GOAWAY has been sent, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE will be raised. Note that GOAWAY frames are typically sent automatically by the connection during shutdown.
Arguments
http2_connection: HTTP/2 connection.out_http2_error: Gets set to HTTP/2 error code sent in most recent GOAWAY.out_last_stream_id: Gets set to Last-Stream-ID sent in most recent GOAWAY.
Prototype
int aws_http2_connection_get_sent_goaway( struct aws_http_connection *http2_connection, uint32_t *out_http2_error, uint32_t *out_last_stream_id);LibAwsHTTP.aws_http2_connection_ping — Method
aws_http2_connection_ping(http2_connection, optional_opaque_data, on_completed, user_data)Send a PING frame (HTTP/2 only). Round-trip-time is calculated when PING ACK is received from peer.
Arguments
http2_connection: HTTP/2 connection.optional_opaque_data: Optional payload for PING frame. Must be NULL, or exactly 8 bytes (AWS_HTTP2_PING_DATA_SIZE). If NULL, the 8 byte payload will be all zeroes.on_completed: Optional callback, invoked when PING ACK is received from peer, or when a connection error prevents the PING ACK from being received. Callback always fires on the connection's event-loop thread.user_data: User-data pass to on_completed callback.
Prototype
int aws_http2_connection_ping( struct aws_http_connection *http2_connection, const struct aws_byte_cursor *optional_opaque_data, aws_http2_on_ping_complete_fn *on_completed, void *user_data);LibAwsHTTP.aws_http2_connection_send_goaway — Method
aws_http2_connection_send_goaway(http2_connection, http2_error, allow_more_streams, optional_debug_data)Send a custom GOAWAY frame (HTTP/2 only).
Note that the connection automatically attempts to send a GOAWAY during shutdown (unless a GOAWAY with a valid Last-Stream-ID has already been sent).
This call can be used to gracefully warn the peer of an impending shutdown (http2_error=0, allow_more_streams=true), or to customize the final GOAWAY frame that is sent by this connection.
The other end may not receive the goaway, if the connection already closed.
Arguments
http2_connection: HTTP/2 connection.http2_error: The HTTP/2 error code (RFC-7540 section 7) to send.enum [awshttp2error_code](@ref)lists official codes.allow_more_streams: If true, new peer-initiated streams will continue to be acknowledged and the GOAWAY's Last-Stream-ID will be set to a max value. If false, new peer-initiated streams will be ignored and the GOAWAY's Last-Stream-ID will be set to the latest acknowledged stream.optional_debug_data: Optional debug data to send. Size must not exceed 16KB.
Prototype
void aws_http2_connection_send_goaway( struct aws_http_connection *http2_connection, uint32_t http2_error, bool allow_more_streams, const struct aws_byte_cursor *optional_debug_data);LibAwsHTTP.aws_http2_connection_update_window — Method
aws_http2_connection_update_window(http2_connection, increment_size)Increment the connection's flow-control window to keep data flowing (HTTP/2 only).
If the connection was created with conn_manual_window_management set true, the flow-control window of the connection will shrink as body data is received for all the streams created on it. (headers, padding, and other metadata do not affect the window). The initial connection flow-control window is 65,535. Once the connection's flow-control window reaches to 0, all the streams on the connection stop receiving any further data.
If conn_manual_window_management is false, this call will have no effect. The connection maintains its flow-control windows such that no back-pressure is applied and data arrives as fast as possible.
If you are not connected, this call will have no effect.
Crashes when the connection is not http2 connection. The limit of the Maximum Size is 2**31 - 1. And client will make sure the WINDOW_UPDATE frame to be valid.
The client control exactly when the WINDOW_UPDATE frame sent. Check conn_window_size_threshold_to_send_update for details.
Arguments
http2_connection: HTTP/2 connection.increment_size: The size to increment for the connection's flow control window
Prototype
void aws_http2_connection_update_window(struct aws_http_connection *http2_connection, uint32_t increment_size);LibAwsHTTP.aws_http2_headers_get_request_authority — Method
aws_http2_headers_get_request_authority(h2_headers, out_authority)Documentation not found.
Prototype
int aws_http2_headers_get_request_authority( const struct aws_http_headers *h2_headers, struct aws_byte_cursor *out_authority);LibAwsHTTP.aws_http2_headers_get_request_method — Method
aws_http2_headers_get_request_method(h2_headers, out_method)Get the :method value (HTTP/2 headers only).
Prototype
int aws_http2_headers_get_request_method(const struct aws_http_headers *h2_headers, struct aws_byte_cursor *out_method);LibAwsHTTP.aws_http2_headers_get_request_path — Method
aws_http2_headers_get_request_path(h2_headers, out_path)Documentation not found.
Prototype
int aws_http2_headers_get_request_path(const struct aws_http_headers *h2_headers, struct aws_byte_cursor *out_path);LibAwsHTTP.aws_http2_headers_get_request_scheme — Method
aws_http2_headers_get_request_scheme(h2_headers, out_scheme)Documentation not found.
Prototype
int aws_http2_headers_get_request_scheme(const struct aws_http_headers *h2_headers, struct aws_byte_cursor *out_scheme);LibAwsHTTP.aws_http2_headers_get_response_status — Method
aws_http2_headers_get_response_status(h2_headers, out_status_code)Get :status (response pseudo headers only). If no status is set, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE is raised.
Prototype
int aws_http2_headers_get_response_status(const struct aws_http_headers *h2_headers, int *out_status_code);LibAwsHTTP.aws_http2_headers_set_request_authority — Method
aws_http2_headers_set_request_authority(h2_headers, authority)Set :authority (request pseudo headers only). The pseudo headers makes its own copy of the underlying string.
Prototype
int aws_http2_headers_set_request_authority(struct aws_http_headers *h2_headers, struct aws_byte_cursor authority);LibAwsHTTP.aws_http2_headers_set_request_method — Method
aws_http2_headers_set_request_method(h2_headers, method)Set :method (HTTP/2 headers only). The headers makes its own copy of the underlying string.
Prototype
int aws_http2_headers_set_request_method(struct aws_http_headers *h2_headers, struct aws_byte_cursor method);LibAwsHTTP.aws_http2_headers_set_request_path — Method
aws_http2_headers_set_request_path(h2_headers, path)Set :path (request pseudo headers only). The pseudo headers makes its own copy of the underlying string.
Prototype
int aws_http2_headers_set_request_path(struct aws_http_headers *h2_headers, struct aws_byte_cursor path);LibAwsHTTP.aws_http2_headers_set_request_scheme — Method
aws_http2_headers_set_request_scheme(h2_headers, scheme)Set :scheme (request pseudo headers only). The pseudo headers makes its own copy of the underlying string.
Prototype
int aws_http2_headers_set_request_scheme(struct aws_http_headers *h2_headers, struct aws_byte_cursor scheme);LibAwsHTTP.aws_http2_headers_set_response_status — Method
aws_http2_headers_set_response_status(h2_headers, status_code)Set :status (response pseudo headers only).
Prototype
int aws_http2_headers_set_response_status(struct aws_http_headers *h2_headers, int status_code);LibAwsHTTP.aws_http2_message_new_from_http1 — Method
aws_http2_message_new_from_http1(alloc, http1_msg)Create an HTTP/2 message from HTTP/1.1 message. pseudo headers will be created from the context and added to the headers of new message. Normal headers will be copied to the headers of new message. Note: - if host exist, it will be removed and :authority will be added using the information. - :scheme always defaults to "https". To use a different scheme create the HTTP/2 message directly
Prototype
struct aws_http_message *aws_http2_message_new_from_http1( struct aws_allocator *alloc, const struct aws_http_message *http1_msg);LibAwsHTTP.aws_http2_message_new_request — Method
aws_http2_message_new_request(allocator)Create a new HTTP/2 request message. pseudo headers need to be set from aws_http2_headers_set_request_* to the headers of the aws_http_message. Will be errored out if used in HTTP/1.1 connection.
The caller has a hold on the object and must call aws_http_message_release() when they are done with it.
Prototype
struct aws_http_message *aws_http2_message_new_request(struct aws_allocator *allocator);LibAwsHTTP.aws_http2_message_new_response — Method
aws_http2_message_new_response(allocator)Create a new HTTP/2 response message. pseudo headers need to be set from aws_http2_headers_set_response_status to the headers of the aws_http_message. Will be errored out if used in HTTP/1.1 connection.
The caller has a hold on the object and must call aws_http_message_release() when they are done with it.
Prototype
struct aws_http_message *aws_http2_message_new_response(struct aws_allocator *allocator);LibAwsHTTP.aws_http2_stream_get_received_reset_error_code — Method
aws_http2_stream_get_received_reset_error_code(http2_stream, out_http2_error)Get the error code received in rst_stream. Only valid if the stream has completed, and an RST_STREAM frame has received.
Arguments
http2_stream: HTTP/2 stream.out_http2_error: Gets to set to HTTP/2 error code received in rst_stream.
Prototype
int aws_http2_stream_get_received_reset_error_code(struct aws_http_stream *http2_stream, uint32_t *out_http2_error);LibAwsHTTP.aws_http2_stream_get_sent_reset_error_code — Method
aws_http2_stream_get_sent_reset_error_code(http2_stream, out_http2_error)Get the HTTP/2 error code sent in the RST_STREAM frame (HTTP/2 only). Only valid if the stream has completed, and has sent an RST_STREAM frame.
Arguments
http2_stream: HTTP/2 stream.out_http2_error: Gets to set to HTTP/2 error code sent in rst_stream.
Prototype
int aws_http2_stream_get_sent_reset_error_code(struct aws_http_stream *http2_stream, uint32_t *out_http2_error);LibAwsHTTP.aws_http2_stream_manager_acquire — Method
aws_http2_stream_manager_acquire(manager)Acquire a refcount from the stream manager, stream manager will start to destroy after the refcount drops to zero. NULL is acceptable. Initial refcount after new is 1.
Arguments
manager:
Returns
The same pointer acquiring.
Prototype
struct aws_http2_stream_manager *aws_http2_stream_manager_acquire(struct aws_http2_stream_manager *manager);LibAwsHTTP.aws_http2_stream_manager_acquire_stream — Method
aws_http2_stream_manager_acquire_stream(http2_stream_manager, acquire_stream_option)Acquire a stream from stream manager asynchronously.
Arguments
http2_stream_manager:acquire_stream_option: seeaws_http2_stream_manager_acquire_stream_options
Prototype
void aws_http2_stream_manager_acquire_stream( struct aws_http2_stream_manager *http2_stream_manager, const struct aws_http2_stream_manager_acquire_stream_options *acquire_stream_option);LibAwsHTTP.aws_http2_stream_manager_fetch_metrics — Method
aws_http2_stream_manager_fetch_metrics(http2_stream_manager, out_metrics)Fetch the current metrics from stream manager.
Arguments
http2_stream_manager:out_metrics: The metrics to be fetched
Prototype
void aws_http2_stream_manager_fetch_metrics( const struct aws_http2_stream_manager *http2_stream_manager, struct aws_http_manager_metrics *out_metrics);LibAwsHTTP.aws_http2_stream_manager_new — Method
aws_http2_stream_manager_new(allocator, options)Documentation not found.
Prototype
struct aws_http2_stream_manager *aws_http2_stream_manager_new( struct aws_allocator *allocator, const struct aws_http2_stream_manager_options *options);LibAwsHTTP.aws_http2_stream_manager_release — Method
aws_http2_stream_manager_release(manager)Release a refcount from the stream manager, stream manager will start to destroy after the refcount drops to zero. NULL is acceptable. Initial refcount after new is 1.
Arguments
manager:
Returns
NULL
Prototype
struct aws_http2_stream_manager *aws_http2_stream_manager_release(struct aws_http2_stream_manager *manager);LibAwsHTTP.aws_http2_stream_reset — Method
aws_http2_stream_reset(http2_stream, http2_error)Reset the HTTP/2 stream (HTTP/2 only). Note that if the stream closes before this async call is fully processed, the RST_STREAM frame will not be sent.
Arguments
http2_stream: HTTP/2 stream.http2_error:aws_http2_error_code. Reason to reset the stream.
Prototype
int aws_http2_stream_reset(struct aws_http_stream *http2_stream, uint32_t http2_error);LibAwsHTTP.aws_http2_stream_write_data — Method
aws_http2_stream_write_data(http2_stream, options)The stream must have specified http2_use_manual_data_writes during request creation. For client streams, activate() must be called before any frames are submitted. For server streams, the response headers must be submitted before any frames. A write with options that has end_stream set to be true will end the stream and prevent any further write.
Typical usage will be something like: options.http2_use_manual_data_writes = true; stream = aws_http_connection_make_request(connection, &options); aws_http_stream_activate(stream); ... struct aws_http2_stream_write_data_options write; aws_http2_stream_write_data(stream, &write); ... struct aws_http2_stream_write_data_options last_write; last_write.end_stream = true; aws_http2_stream_write_data(stream, &write); ... aws_http_stream_release(stream);
Returns
AWS_OP_SUCCESS if the write was queued AWS_OP_ERROR indicating the attempt raised an error code. AWS_ERROR_INVALID_STATE will be raised for invalid usage. AWS_ERROR_HTTP_STREAM_HAS_COMPLETED will be raised if the stream ended for reasons behind the scenes.
Prototype
int aws_http2_stream_write_data( struct aws_http_stream *http2_stream, const struct aws_http2_stream_write_data_options *options);LibAwsHTTP.aws_http_alpn_map_init — Method
aws_http_alpn_map_init(allocator, map)Initialize an empty hash-table that maps struct aws\_string * to enum [awshttpversion](@ref). This map can used in aws_http_client_connections_options.alpn_string_map.
Prototype
int aws_http_alpn_map_init(struct aws_allocator *allocator, struct aws_hash_table *map);LibAwsHTTP.aws_http_alpn_map_init_copy — Method
aws_http_alpn_map_init_copy(allocator, dest, src)Initialize an map copied from the *src map, which maps struct aws\_string * to enum [awshttpversion](@ref).
Prototype
int aws_http_alpn_map_init_copy( struct aws_allocator *allocator, struct aws_hash_table *dest, struct aws_hash_table *src);LibAwsHTTP.aws_http_client_connect — Method
aws_http_client_connect(options)Asynchronously establish a client connection. The on_setup callback is invoked when the operation has created a connection or failed.
Prototype
int aws_http_client_connect(const struct aws_http_client_connection_options *options);LibAwsHTTP.aws_http_connection_close — Method
aws_http_connection_close(connection)Begin shutdown sequence of the connection if it hasn't already started. This will schedule shutdown tasks on the EventLoop that may send HTTP/TLS/TCP shutdown messages to peers if necessary, and will eventually cause internal connection memory to stop being accessed and on_shutdown() callback to be called.
It's safe to call this function regardless of the connection state as long as you hold a reference to the connection.
Prototype
void aws_http_connection_close(struct aws_http_connection *connection);LibAwsHTTP.aws_http_connection_configure_server — Method
aws_http_connection_configure_server(connection, options)Configure a server connection. This must be called from the server's on_incoming_connection callback.
Prototype
int aws_http_connection_configure_server( struct aws_http_connection *connection, const struct aws_http_server_connection_options *options);LibAwsHTTP.aws_http_connection_get_channel — Method
aws_http_connection_get_channel(connection)Returns the channel hosting the HTTP connection. Do not expose this function to language bindings.
Prototype
struct aws_channel *aws_http_connection_get_channel(struct aws_http_connection *connection);LibAwsHTTP.aws_http_connection_get_remote_endpoint — Method
aws_http_connection_get_remote_endpoint(connection)Returns the remote endpoint of the HTTP connection.
Prototype
const struct aws_socket_endpoint *aws_http_connection_get_remote_endpoint(const struct aws_http_connection *connection);LibAwsHTTP.aws_http_connection_get_version — Method
aws_http_connection_get_version(connection)Documentation not found.
Prototype
enum aws_http_version aws_http_connection_get_version(const struct aws_http_connection *connection);LibAwsHTTP.aws_http_connection_is_client — Method
aws_http_connection_is_client(connection)Returns true if this is a client connection.
Prototype
bool aws_http_connection_is_client(const struct aws_http_connection *connection);LibAwsHTTP.aws_http_connection_is_open — Method
aws_http_connection_is_open(connection)Returns true unless the connection is closed or closing.
Prototype
bool aws_http_connection_is_open(const struct aws_http_connection *connection);LibAwsHTTP.aws_http_connection_is_server — Method
aws_http_connection_is_server(connection)Returns true if this is a server connection.
Prototype
bool aws_http_connection_is_server(const struct aws_http_connection *connection);LibAwsHTTP.aws_http_connection_make_request — Method
aws_http_connection_make_request(client_connection, options)Create a stream, with a client connection sending a request. The request does not start sending automatically once the stream is created. You must call aws_http_stream_activate to begin execution of the request.
The options are copied during this call.
Tip for language bindings: Do not bind the options struct. Use something more natural for your language, such as Builder Pattern in Java, or Python's ability to take many optional arguments by name.
Note: The header of the request will be sent as it is when the message to send protocol matches the protocol of the connection. - No user-agent will be added. - No security check will be enforced. eg: referer header privacy should be enforced by the user-agent who adds the header - When HTTP/1 message sent on HTTP/2 connection, aws_http2_message_new_from_http1 will be applied under the hood. - When HTTP/2 message sent on HTTP/1 connection, no change will be made.
Prototype
struct aws_http_stream *aws_http_connection_make_request( struct aws_http_connection *client_connection, const struct aws_http_make_request_options *options);LibAwsHTTP.aws_http_connection_manager_acquire — Method
aws_http_connection_manager_acquire(manager)Documentation not found.
Prototype
void aws_http_connection_manager_acquire(struct aws_http_connection_manager *manager);LibAwsHTTP.aws_http_connection_manager_acquire_connection — Method
aws_http_connection_manager_acquire_connection(manager, callback, user_data)Documentation not found.
Prototype
void aws_http_connection_manager_acquire_connection( struct aws_http_connection_manager *manager, aws_http_connection_manager_on_connection_setup_fn *callback, void *user_data);LibAwsHTTP.aws_http_connection_manager_fetch_metrics — Method
aws_http_connection_manager_fetch_metrics(manager, out_metrics)Fetch the current manager metrics from connection manager.
Prototype
void aws_http_connection_manager_fetch_metrics( const struct aws_http_connection_manager *manager, struct aws_http_manager_metrics *out_metrics);LibAwsHTTP.aws_http_connection_manager_new — Method
aws_http_connection_manager_new(allocator, options)Documentation not found.
Prototype
struct aws_http_connection_manager *aws_http_connection_manager_new( struct aws_allocator *allocator, const struct aws_http_connection_manager_options *options);LibAwsHTTP.aws_http_connection_manager_release — Method
aws_http_connection_manager_release(manager)Documentation not found.
Prototype
void aws_http_connection_manager_release(struct aws_http_connection_manager *manager);LibAwsHTTP.aws_http_connection_manager_release_connection — Method
aws_http_connection_manager_release_connection(manager, connection)Documentation not found.
Prototype
int aws_http_connection_manager_release_connection( struct aws_http_connection_manager *manager, struct aws_http_connection *connection);LibAwsHTTP.aws_http_connection_new_requests_allowed — Method
aws_http_connection_new_requests_allowed(connection)Return whether the connection can make a new requests. If false, then a new connection must be established to make further requests.
Prototype
bool aws_http_connection_new_requests_allowed(const struct aws_http_connection *connection);LibAwsHTTP.aws_http_connection_release — Method
aws_http_connection_release(connection)Users must release the connection when they are done with it. The connection's memory cannot be reclaimed until this is done. If the connection was not already shutting down, it will be shut down.
Users should always wait for the on_shutdown() callback to be called before releasing any data passed to the http_connection (Eg aws_tls_connection_options, aws_socket_options) otherwise there will be race conditions between http_connection shutdown tasks and memory release tasks, causing Segfaults.
Prototype
void aws_http_connection_release(struct aws_http_connection *connection);LibAwsHTTP.aws_http_connection_stop_new_requests — Method
aws_http_connection_stop_new_requests(connection)Stop accepting new requests for the connection. It will NOT start the shutdown process for the connection. The requests that are already open can still wait to be completed, but new requests will fail to be created,
Prototype
void aws_http_connection_stop_new_requests(struct aws_http_connection *connection);LibAwsHTTP.aws_http_header_name_eq — Method
aws_http_header_name_eq(name_a, name_b)Return whether both names are equivalent. This is a case-insensitive string comparison.
Example Matches: "Content-Length" == "content-length" // upper or lower case ok
Example Mismatches: "Content-Length" != " Content-Length" // leading whitespace bad
Prototype
bool aws_http_header_name_eq(struct aws_byte_cursor name_a, struct aws_byte_cursor name_b);LibAwsHTTP.aws_http_headers_acquire — Method
aws_http_headers_acquire(headers)Acquire a hold on the object, preventing it from being deleted until aws_http_headers_release() is called by all those with a hold on it.
Prototype
void aws_http_headers_acquire(struct aws_http_headers *headers);LibAwsHTTP.aws_http_headers_add — Method
aws_http_headers_add(headers, name, value)Add a header. The underlying strings are copied.
Prototype
int aws_http_headers_add(struct aws_http_headers *headers, struct aws_byte_cursor name, struct aws_byte_cursor value);LibAwsHTTP.aws_http_headers_add_array — Method
aws_http_headers_add_array(headers, array, count)Add an array of headers. The underlying strings are copied.
Prototype
int aws_http_headers_add_array(struct aws_http_headers *headers, const struct aws_http_header *array, size_t count);LibAwsHTTP.aws_http_headers_add_header — Method
aws_http_headers_add_header(headers, header)Add a header. The underlying strings are copied.
Prototype
int aws_http_headers_add_header(struct aws_http_headers *headers, const struct aws_http_header *header);LibAwsHTTP.aws_http_headers_clear — Method
aws_http_headers_clear(headers)Clear all headers.
Prototype
void aws_http_headers_clear(struct aws_http_headers *headers);LibAwsHTTP.aws_http_headers_count — Method
aws_http_headers_count(headers)Get the total number of headers.
Prototype
size_t aws_http_headers_count(const struct aws_http_headers *headers);LibAwsHTTP.aws_http_headers_erase — Method
aws_http_headers_erase(headers, name)Remove all headers with this name. AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised if no headers with this name are found.
Prototype
int aws_http_headers_erase(struct aws_http_headers *headers, struct aws_byte_cursor name);LibAwsHTTP.aws_http_headers_erase_index — Method
aws_http_headers_erase_index(headers, index)Remove the header at the specified index.
AWS_ERROR_INVALID_INDEX is raised if the index is invalid.
Prototype
int aws_http_headers_erase_index(struct aws_http_headers *headers, size_t index);LibAwsHTTP.aws_http_headers_erase_value — Method
aws_http_headers_erase_value(headers, name, value)Remove the first header found with this name and value. AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised if no such header is found.
Prototype
int aws_http_headers_erase_value( struct aws_http_headers *headers, struct aws_byte_cursor name, struct aws_byte_cursor value);LibAwsHTTP.aws_http_headers_get — Method
aws_http_headers_get(headers, name, out_value)Get the first value for this name, ignoring any additional values. AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised if the name is not found.
Prototype
int aws_http_headers_get( const struct aws_http_headers *headers, struct aws_byte_cursor name, struct aws_byte_cursor *out_value);LibAwsHTTP.aws_http_headers_get_all — Method
aws_http_headers_get_all(headers, name)Get all values with this name, combined into one new aws_string that you are responsible for destroying. If there are multiple headers with this name, their values are appended with comma-separators. If there are no headers with this name, NULL is returned and AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised.
Prototype
struct aws_string *aws_http_headers_get_all(const struct aws_http_headers *headers, struct aws_byte_cursor name);LibAwsHTTP.aws_http_headers_get_index — Method
aws_http_headers_get_index(headers, index, out_header)Get the header at the specified index. The index of a given header may change any time headers are modified. When iterating headers, the following ordering rules apply:
Headers with the same name will always be in the same order, relative to one another. If "A: one" is added before "A: two", then "A: one" will always precede "A: two".
Headers with different names could be in any order, relative to one another. If "A: one" is seen before "B: bee" in one iteration, you might see "B: bee" before "A: one" on the next.
AWS_ERROR_INVALID_INDEX is raised if the index is invalid.
Prototype
int aws_http_headers_get_index( const struct aws_http_headers *headers, size_t index, struct aws_http_header *out_header);LibAwsHTTP.aws_http_headers_has — Method
aws_http_headers_has(headers, name)Test if header name exists or not in headers
Prototype
bool aws_http_headers_has(const struct aws_http_headers *headers, struct aws_byte_cursor name);LibAwsHTTP.aws_http_headers_new — Method
aws_http_headers_new(allocator)Create a new headers object. The caller has a hold on the object and must call aws_http_headers_release() when they are done with it.
Prototype
struct aws_http_headers *aws_http_headers_new(struct aws_allocator *allocator);LibAwsHTTP.aws_http_headers_release — Method
aws_http_headers_release(headers)Release a hold on the object. The object is deleted when all holds on it are released.
Prototype
void aws_http_headers_release(struct aws_http_headers *headers);LibAwsHTTP.aws_http_headers_set — Method
aws_http_headers_set(headers, name, value)Set a header value. The header is added if necessary and any existing values for this name are removed. The underlying strings are copied.
Prototype
int aws_http_headers_set(struct aws_http_headers *headers, struct aws_byte_cursor name, struct aws_byte_cursor value);LibAwsHTTP.aws_http_library_clean_up — Method
aws_http_library_clean_up()Clean up internal datastructures used by aws-c-http. Must not be called until application is done using functionality in aws-c-http.
Prototype
void aws_http_library_clean_up(void);LibAwsHTTP.aws_http_library_init — Method
aws_http_library_init(alloc)Initializes internal datastructures used by aws-c-http. Must be called before using any functionality in aws-c-http.
Prototype
void aws_http_library_init(struct aws_allocator *alloc);LibAwsHTTP.aws_http_message_acquire — Method
aws_http_message_acquire(message)Acquire a hold on the object, preventing it from being deleted until aws_http_message_release() is called by all those with a hold on it.
This function returns the passed in message (possibly NULL) so that acquire-and-assign can be done with a single statement.
Prototype
struct aws_http_message *aws_http_message_acquire(struct aws_http_message *message);LibAwsHTTP.aws_http_message_add_header — Method
aws_http_message_add_header(message, header)Add a header to the end of the array. The message makes its own copy of the underlying strings.
Prototype
int aws_http_message_add_header(struct aws_http_message *message, struct aws_http_header header);LibAwsHTTP.aws_http_message_add_header_array — Method
aws_http_message_add_header_array(message, headers, num_headers)Add an array of headers to the end of the header array. The message makes its own copy of the underlying strings.
This is a helper function useful when it's easier to define headers as a stack array, rather than calling add_header repeatedly.
Prototype
int aws_http_message_add_header_array( struct aws_http_message *message, const struct aws_http_header *headers, size_t num_headers);LibAwsHTTP.aws_http_message_destroy — Method
aws_http_message_destroy(message)Deprecated. This is equivalent to aws_http_message_release().
Prototype
void aws_http_message_destroy(struct aws_http_message *message);LibAwsHTTP.aws_http_message_erase_header — Method
aws_http_message_erase_header(message, index)Remove the header at the specified index. Headers after this index are all shifted back one position.
This function cannot fail if a valid index is provided. Otherwise, AWS_ERROR_INVALID_INDEX will be raised.
Prototype
int aws_http_message_erase_header(struct aws_http_message *message, size_t index);LibAwsHTTP.aws_http_message_get_body_stream — Method
aws_http_message_get_body_stream(message)Get the body stream. Returns NULL if no body stream is set.
Prototype
struct aws_input_stream *aws_http_message_get_body_stream(const struct aws_http_message *message);LibAwsHTTP.aws_http_message_get_const_headers — Method
aws_http_message_get_const_headers(message)Get the message's const aws_http_headers.
Prototype
const struct aws_http_headers *aws_http_message_get_const_headers(const struct aws_http_message *message);LibAwsHTTP.aws_http_message_get_header — Method
aws_http_message_get_header(message, out_header, index)Get the header at the specified index. This function cannot fail if a valid index is provided. Otherwise, AWS_ERROR_INVALID_INDEX will be raised.
The underlying strings are stored within the message.
Prototype
int aws_http_message_get_header( const struct aws_http_message *message, struct aws_http_header *out_header, size_t index);LibAwsHTTP.aws_http_message_get_header_count — Method
aws_http_message_get_header_count(message)Get the number of headers.
Prototype
size_t aws_http_message_get_header_count(const struct aws_http_message *message);LibAwsHTTP.aws_http_message_get_headers — Method
aws_http_message_get_headers(message)This datastructure has more functions for inspecting and modifying headers than are available on the aws_http_message datastructure.
Prototype
struct aws_http_headers *aws_http_message_get_headers(const struct aws_http_message *message);LibAwsHTTP.aws_http_message_get_protocol_version — Method
aws_http_message_get_protocol_version(message)Get the protocol version of the http message.
Prototype
enum aws_http_version aws_http_message_get_protocol_version(const struct aws_http_message *message);LibAwsHTTP.aws_http_message_get_request_method — Method
aws_http_message_get_request_method(request_message, out_method)Get the method (request messages only).
Prototype
int aws_http_message_get_request_method( const struct aws_http_message *request_message, struct aws_byte_cursor *out_method);LibAwsHTTP.aws_http_message_get_request_path — Method
aws_http_message_get_request_path(request_message, out_path)Documentation not found.
Prototype
int aws_http_message_get_request_path(const struct aws_http_message *request_message, struct aws_byte_cursor *out_path);LibAwsHTTP.aws_http_message_get_response_status — Method
aws_http_message_get_response_status(response_message, out_status_code)Get the status code (response messages only). If no status is set, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE is raised.
Prototype
int aws_http_message_get_response_status(const struct aws_http_message *response_message, int *out_status_code);LibAwsHTTP.aws_http_message_is_request — Method
aws_http_message_is_request(message)Documentation not found.
Prototype
bool aws_http_message_is_request(const struct aws_http_message *message);LibAwsHTTP.aws_http_message_is_response — Method
aws_http_message_is_response(message)Documentation not found.
Prototype
bool aws_http_message_is_response(const struct aws_http_message *message);LibAwsHTTP.aws_http_message_new_request — Method
aws_http_message_new_request(allocator)Create a new HTTP/1.1 request message. The message is blank, all properties (method, path, etc) must be set individually. If HTTP/1.1 message used in HTTP/2 connection, the transformation will be automatically applied. A HTTP/2 message will created and sent based on the HTTP/1.1 message.
The caller has a hold on the object and must call aws_http_message_release() when they are done with it.
Prototype
struct aws_http_message *aws_http_message_new_request(struct aws_allocator *allocator);LibAwsHTTP.aws_http_message_new_request_with_headers — Method
aws_http_message_new_request_with_headers(allocator, existing_headers)Like aws_http_message_new_request(), but uses existing aws_http_headers instead of creating a new one. Acquires a hold on the headers, and releases it when the request is destroyed.
Prototype
struct aws_http_message *aws_http_message_new_request_with_headers( struct aws_allocator *allocator, struct aws_http_headers *existing_headers);LibAwsHTTP.aws_http_message_new_response — Method
aws_http_message_new_response(allocator)Create a new HTTP/1.1 response message. The message is blank, all properties (status, headers, etc) must be set individually.
The caller has a hold on the object and must call aws_http_message_release() when they are done with it.
Prototype
struct aws_http_message *aws_http_message_new_response(struct aws_allocator *allocator);LibAwsHTTP.aws_http_message_new_websocket_handshake_request — Method
aws_http_message_new_websocket_handshake_request(allocator, path, host)Create request with all required fields for a websocket upgrade request. The method and path are set, and the the following headers are added:
Host: <host> Upgrade: websocket Connection: Upgrade Sec-WebSocket-Key: <base64 encoding of 16 random bytes> Sec-WebSocket-Version: 13
Prototype
struct aws_http_message *aws_http_message_new_websocket_handshake_request( struct aws_allocator *allocator, struct aws_byte_cursor path, struct aws_byte_cursor host);LibAwsHTTP.aws_http_message_release — Method
aws_http_message_release(message)Release a hold on the object. The object is deleted when all holds on it are released.
This function always returns NULL so that release-and-assign-NULL can be done with a single statement.
Prototype
struct aws_http_message *aws_http_message_release(struct aws_http_message *message);LibAwsHTTP.aws_http_message_set_body_stream — Method
aws_http_message_set_body_stream(message, body_stream)Set the body stream. NULL is an acceptable value for messages with no body. Note: The message does NOT take ownership of the body stream. The stream must not be destroyed until the message is complete.
Prototype
void aws_http_message_set_body_stream(struct aws_http_message *message, struct aws_input_stream *body_stream);LibAwsHTTP.aws_http_message_set_request_method — Method
aws_http_message_set_request_method(request_message, method)Set the method (request messages only). The request makes its own copy of the underlying string.
Prototype
int aws_http_message_set_request_method(struct aws_http_message *request_message, struct aws_byte_cursor method);LibAwsHTTP.aws_http_message_set_request_path — Method
aws_http_message_set_request_path(request_message, path)Set the path-and-query value (request messages only). The request makes its own copy of the underlying string.
Prototype
int aws_http_message_set_request_path(struct aws_http_message *request_message, struct aws_byte_cursor path);LibAwsHTTP.aws_http_message_set_response_status — Method
aws_http_message_set_response_status(response_message, status_code)Set the status code (response messages only).
Prototype
int aws_http_message_set_response_status(struct aws_http_message *response_message, int status_code);LibAwsHTTP.aws_http_options_validate_proxy_configuration — Method
aws_http_options_validate_proxy_configuration(options)Checks http proxy options for correctness
Prototype
int aws_http_options_validate_proxy_configuration(const struct aws_http_client_connection_options *options);LibAwsHTTP.aws_http_proxy_config_destroy — Method
aws_http_proxy_config_destroy(config)Destroys an http proxy configuration
Arguments
config: http proxy configuration to destroy
Prototype
void aws_http_proxy_config_destroy(struct aws_http_proxy_config *config);LibAwsHTTP.aws_http_proxy_config_new_clone — Method
aws_http_proxy_config_new_clone(allocator, proxy_config)Clones an existing proxy configuration. A refactor could remove this (do a "move" between the old and new user data in the one spot it's used) but that should wait until we have better test cases for the logic where this gets invoked (ntlm/kerberos chains).
Arguments
allocator: memory allocator to useproxy_config: http proxy configuration to clone
Returns
Prototype
struct aws_http_proxy_config *aws_http_proxy_config_new_clone( struct aws_allocator *allocator, const struct aws_http_proxy_config *proxy_config);LibAwsHTTP.aws_http_proxy_config_new_from_connection_options — Method
aws_http_proxy_config_new_from_connection_options(allocator, options)Create a persistent proxy configuration from http connection options
Arguments
allocator: memory allocator to useoptions: http connection options to source proxy configuration from
Returns
Prototype
struct aws_http_proxy_config *aws_http_proxy_config_new_from_connection_options( struct aws_allocator *allocator, const struct aws_http_client_connection_options *options);LibAwsHTTP.aws_http_proxy_config_new_from_manager_options — Method
aws_http_proxy_config_new_from_manager_options(allocator, options)Create a persistent proxy configuration from http connection manager options
Arguments
allocator: memory allocator to useoptions: http connection manager options to source proxy configuration from
Returns
Prototype
struct aws_http_proxy_config *aws_http_proxy_config_new_from_manager_options( struct aws_allocator *allocator, const struct aws_http_connection_manager_options *options);LibAwsHTTP.aws_http_proxy_config_new_from_proxy_options — Method
aws_http_proxy_config_new_from_proxy_options(allocator, options)Create a persistent proxy configuration from non-persistent proxy options. Legacy connection type of proxy options will be rejected.
Arguments
allocator: memory allocator to useoptions: http proxy options to source proxy configuration from
Returns
Prototype
struct aws_http_proxy_config *aws_http_proxy_config_new_from_proxy_options( struct aws_allocator *allocator, const struct aws_http_proxy_options *options);LibAwsHTTP.aws_http_proxy_config_new_from_proxy_options_with_tls_info — Method
aws_http_proxy_config_new_from_proxy_options_with_tls_info(allocator, proxy_options, is_tls_connection)Create a persistent proxy configuration from non-persistent proxy options.
Arguments
allocator: memory allocator to useoptions: http proxy options to source proxy configuration fromis_tls_connection: tls connection info of the main connection to determine connection_type when the connection_type is legacy.
Returns
Prototype
struct aws_http_proxy_config *aws_http_proxy_config_new_from_proxy_options_with_tls_info( struct aws_allocator *allocator, const struct aws_http_proxy_options *proxy_options, bool is_tls_connection);LibAwsHTTP.aws_http_proxy_config_new_tunneling_from_proxy_options — Method
aws_http_proxy_config_new_tunneling_from_proxy_options(allocator, options)Create a persistent proxy configuration from non-persistent proxy options. The resulting proxy configuration assumes a tunneling connection type.
Arguments
allocator: memory allocator to useoptions: http proxy options to source proxy configuration from
Returns
Prototype
struct aws_http_proxy_config *aws_http_proxy_config_new_tunneling_from_proxy_options( struct aws_allocator *allocator, const struct aws_http_proxy_options *options);LibAwsHTTP.aws_http_proxy_negotiator_acquire — Method
aws_http_proxy_negotiator_acquire(proxy_negotiator)Take a reference to an http proxy negotiator
Arguments
proxy_negotiator: negotiator to take a reference to
Returns
the strategy
Prototype
struct aws_http_proxy_negotiator *aws_http_proxy_negotiator_acquire(struct aws_http_proxy_negotiator *proxy_negotiator);LibAwsHTTP.aws_http_proxy_negotiator_release — Method
aws_http_proxy_negotiator_release(proxy_negotiator)Release a reference to an http proxy negotiator
Arguments
proxy_negotiator: negotiator to release a reference to
Prototype
void aws_http_proxy_negotiator_release(struct aws_http_proxy_negotiator *proxy_negotiator);LibAwsHTTP.aws_http_proxy_new_socket_channel — Method
aws_http_proxy_new_socket_channel(channel_options, proxy_options)Establish an arbitrary protocol connection through an http proxy via tunneling CONNECT. Alpn is not required for this connection process to succeed, but we encourage its use if available.
Arguments
channel_options: configuration options for the socket level connectionproxy_options: configuration options for the proxy connection
Returns
AWS_OP_SUCCESS if the asynchronous channel kickoff succeeded, AWS_OP_ERR otherwise
Prototype
int aws_http_proxy_new_socket_channel( struct aws_socket_channel_bootstrap_options *channel_options, const struct aws_http_proxy_options *proxy_options);LibAwsHTTP.aws_http_proxy_options_init_from_config — Method
aws_http_proxy_options_init_from_config(options, config)Initializes non-persistent http proxy options from a persistent http proxy configuration
Arguments
options: http proxy options to initializeconfig: the http proxy config to use as an initialization source
Prototype
void aws_http_proxy_options_init_from_config( struct aws_http_proxy_options *options, const struct aws_http_proxy_config *config);LibAwsHTTP.aws_http_proxy_strategy_acquire — Method
aws_http_proxy_strategy_acquire(proxy_strategy)Take a reference to an http proxy strategy
Arguments
proxy_strategy: strategy to take a reference to
Returns
the strategy
Prototype
struct aws_http_proxy_strategy *aws_http_proxy_strategy_acquire(struct aws_http_proxy_strategy *proxy_strategy);LibAwsHTTP.aws_http_proxy_strategy_create_negotiator — Method
aws_http_proxy_strategy_create_negotiator(strategy, allocator)Creates a new proxy negotiator from a proxy strategy
Arguments
allocator: memory allocator to usestrategy: strategy to creation a new negotiator for
Returns
a new proxy negotiator if successful, otherwise NULL
Prototype
struct aws_http_proxy_negotiator *aws_http_proxy_strategy_create_negotiator( struct aws_http_proxy_strategy *strategy, struct aws_allocator *allocator);LibAwsHTTP.aws_http_proxy_strategy_new_basic_auth — Method
aws_http_proxy_strategy_new_basic_auth(allocator, config)A constructor for a proxy strategy that performs basic authentication by adding the appropriate header and header value to requests or CONNECT requests.
Arguments
allocator: memory allocator to useconfig: basic authentication configuration info
Returns
a new proxy strategy if successfully constructed, otherwise NULL
Prototype
struct aws_http_proxy_strategy *aws_http_proxy_strategy_new_basic_auth( struct aws_allocator *allocator, struct aws_http_proxy_strategy_basic_auth_options *config);LibAwsHTTP.aws_http_proxy_strategy_new_tunneling_adaptive — Method
aws_http_proxy_strategy_new_tunneling_adaptive(allocator, config)Constructor for an adaptive tunneling proxy strategy. This strategy attempts a vanilla CONNECT and if that fails it may make followup CONNECT attempts using kerberos or ntlm tokens, based on configuration and proxy response properties.
Arguments
allocator: memory allocator to useconfig: configuration options for the strategy
Returns
a new proxy strategy if successfully constructed, otherwise NULL
Prototype
struct aws_http_proxy_strategy *aws_http_proxy_strategy_new_tunneling_adaptive( struct aws_allocator *allocator, struct aws_http_proxy_strategy_tunneling_adaptive_options *config);LibAwsHTTP.aws_http_proxy_strategy_release — Method
aws_http_proxy_strategy_release(proxy_strategy)Release a reference to an http proxy strategy
Arguments
proxy_strategy: strategy to release a reference to
Prototype
void aws_http_proxy_strategy_release(struct aws_http_proxy_strategy *proxy_strategy);LibAwsHTTP.aws_http_server_get_listener_endpoint — Method
aws_http_server_get_listener_endpoint(server)Returns the local listener endpoint of the HTTP server. Only valid as long as the server remains valid.
Prototype
const struct aws_socket_endpoint *aws_http_server_get_listener_endpoint(const struct aws_http_server *server);LibAwsHTTP.aws_http_server_new — Method
aws_http_server_new(options)Create server, a listening socket that accepts incoming connections.
Prototype
struct aws_http_server *aws_http_server_new(const struct aws_http_server_options *options);LibAwsHTTP.aws_http_server_release — Method
aws_http_server_release(server)Release the server. It will close the listening socket and all the connections existing in the server. The on_destroy_complete will be invoked when the destroy operation completes
Prototype
void aws_http_server_release(struct aws_http_server *server);LibAwsHTTP.aws_http_status_text — Method
aws_http_status_text(status_code)Returns the description of common status codes. Ex: 404 -> "Not Found" An empty string is returned if the status code is not recognized.
Prototype
const char *aws_http_status_text(int status_code);LibAwsHTTP.aws_http_stream_acquire — Method
aws_http_stream_acquire(stream)Acquire refcount on the stream to prevent it from being cleaned up until it is released.
Prototype
struct aws_http_stream *aws_http_stream_acquire(struct aws_http_stream *stream);LibAwsHTTP.aws_http_stream_activate — Method
aws_http_stream_activate(stream)Only used for client initiated streams (immediately following a call to aws_http_connection_make_request).
Activates the request's outgoing stream processing.
Prototype
int aws_http_stream_activate(struct aws_http_stream *stream);LibAwsHTTP.aws_http_stream_cancel — Method
aws_http_stream_cancel(stream, error_code)Cancel the stream in flight. For HTTP/1.1 streams, it's equivalent to closing the connection. For HTTP/2 streams, it's equivalent to calling reset on the stream with AWS_HTTP2_ERR_CANCEL.
the stream will complete with the error code provided, unless the stream is already completing for other reasons, or the stream is not activated, in which case this call will have no impact.
Prototype
void aws_http_stream_cancel(struct aws_http_stream *stream, int error_code);LibAwsHTTP.aws_http_stream_get_connection — Method
aws_http_stream_get_connection(stream)Documentation not found.
Prototype
struct aws_http_connection *aws_http_stream_get_connection(const struct aws_http_stream *stream);LibAwsHTTP.aws_http_stream_get_id — Method
aws_http_stream_get_id(stream)Gets the HTTP/2 id associated with a stream. Even h1 streams have an id (using the same allocation procedure as http/2) for easier tracking purposes. For client streams, this will only be non-zero after a successful call to aws_http_stream_activate()
Prototype
uint32_t aws_http_stream_get_id(const struct aws_http_stream *stream);LibAwsHTTP.aws_http_stream_get_incoming_request_method — Method
aws_http_stream_get_incoming_request_method(stream, out_method)Documentation not found.
Prototype
int aws_http_stream_get_incoming_request_method( const struct aws_http_stream *stream, struct aws_byte_cursor *out_method);LibAwsHTTP.aws_http_stream_get_incoming_request_uri — Method
aws_http_stream_get_incoming_request_uri(stream, out_uri)Documentation not found.
Prototype
int aws_http_stream_get_incoming_request_uri(const struct aws_http_stream *stream, struct aws_byte_cursor *out_uri);LibAwsHTTP.aws_http_stream_get_incoming_response_status — Method
aws_http_stream_get_incoming_response_status(stream, out_status)Documentation not found.
Prototype
int aws_http_stream_get_incoming_response_status(const struct aws_http_stream *stream, int *out_status);LibAwsHTTP.aws_http_stream_new_server_request_handler — Method
aws_http_stream_new_server_request_handler(options)Create a stream, with a server connection receiving and responding to a request. This function can only be called from the aws_http_on_incoming_request_fn callback. aws_http_stream_send_response() should be used to send a response.
Prototype
struct aws_http_stream *aws_http_stream_new_server_request_handler( const struct aws_http_request_handler_options *options);LibAwsHTTP.aws_http_stream_release — Method
aws_http_stream_release(stream)Users must release the stream when they are done with it, or its memory will never be cleaned up. This will not cancel the stream, its callbacks will still fire if the stream is still in progress.
Tips for language bindings: - Invoke this from the wrapper class's finalizer/destructor. - Do not let the wrapper class be destroyed until on_complete() has fired.
Prototype
void aws_http_stream_release(struct aws_http_stream *stream);LibAwsHTTP.aws_http_stream_send_response — Method
aws_http_stream_send_response(stream, response)Send response (only callable from "request handler" streams) The response object must stay alive at least until the stream's on_complete is called.
Prototype
int aws_http_stream_send_response(struct aws_http_stream *stream, struct aws_http_message *response);LibAwsHTTP.aws_http_stream_update_window — Method
aws_http_stream_update_window(stream, increment_size)Increment the stream's flow-control window to keep data flowing.
If the connection was created with manual_window_management set true, the flow-control window of each stream will shrink as body data is received (headers, padding, and other metadata do not affect the window). The connection's initial_window_size determines the starting size of each stream's window. If a stream's flow-control window reaches 0, no further data will be received.
If manual_window_management is false, this call will have no effect. The connection maintains its flow-control windows such that no back-pressure is applied and data arrives as fast as possible.
For HTTP/2, the client control exactly when the WINDOW_UPDATE frame sent. And client will make sure the WINDOW_UPDATE frame to be valid. Check stream_window_size_threshold_to_send_update for details.
Prototype
void aws_http_stream_update_window(struct aws_http_stream *stream, size_t increment_size);LibAwsHTTP.aws_websocket_acquire — Method
aws_websocket_acquire(websocket)Increment the websocket's ref-count, preventing it from being destroyed.
Returns
Always returns the same pointer that is passed in.
Prototype
struct aws_websocket *aws_websocket_acquire(struct aws_websocket *websocket);LibAwsHTTP.aws_websocket_client_connect — Method
aws_websocket_client_connect(options)Asynchronously establish a client websocket connection. The on_connection_setup callback is invoked when the operation has finished creating a connection, or failed.
Prototype
int aws_websocket_client_connect(const struct aws_websocket_client_connection_options *options);LibAwsHTTP.aws_websocket_close — Method
aws_websocket_close(websocket, free_scarce_resources_immediately)Close the websocket connection. It is safe to call this, even if the connection is already closed or closing. The websocket will attempt to send a CLOSE frame during normal shutdown. If free_scarce_resources_immediately is true, the connection will be torn down as quickly as possible. This function may be called from any thread.
Prototype
void aws_websocket_close(struct aws_websocket *websocket, bool free_scarce_resources_immediately);LibAwsHTTP.aws_websocket_convert_to_midchannel_handler — Method
aws_websocket_convert_to_midchannel_handler(websocket)Convert the websocket into a mid-channel handler. The websocket will stop being usable via its public API and become just another handler in the channel. The caller will likely install a channel handler to the right. This must not be called in the middle of an incoming frame (between "frame begin" and "frame complete" callbacks). This MUST be called from the websocket's thread.
If successful: - Other than aws_websocket_release(), all calls to aws_websocket_x() functions are ignored. - The websocket will no longer invoke any "incoming frame" callbacks. - aws_io_messages written by a downstream handler will be wrapped in binary data frames and sent upstream. The data may be split/combined as it is sent along. - aws_io_messages read from upstream handlers will be scanned for binary data frames. The payloads of these frames will be sent downstream. The payloads may be split/combined as they are sent along. - An incoming close frame will automatically result in channel-shutdown. - aws_websocket_release() must still be called or the websocket and its channel will never be cleaned up. - The websocket will still invoke its "on connection shutdown" callback when channel shutdown completes.
If unsuccessful, NULL is returned and the websocket is unchanged.
Prototype
int aws_websocket_convert_to_midchannel_handler(struct aws_websocket *websocket);LibAwsHTTP.aws_websocket_get_channel — Method
aws_websocket_get_channel(websocket)Returns the websocket's underlying I/O channel.
Prototype
struct aws_channel *aws_websocket_get_channel(const struct aws_websocket *websocket);LibAwsHTTP.aws_websocket_increment_read_window — Method
aws_websocket_increment_read_window(websocket, size)Manually increment the read window to keep frames flowing.
If the websocket was created with manual_window_management set true, then whenever the read window reaches 0 you will stop receiving data. The websocket's initial_window_size determines the starting size of the read window. The read window shrinks as you receive the payload from "data" frames (TEXT, BINARY, and CONTINUATION). Use aws_websocket_increment_read_window() to increment the window again and keep frames flowing. Maintain a larger window to keep up high throughput. You only need to worry about the payload from "data" frames. The websocket automatically increments the window to account for any other incoming bytes, including other parts of a frame (opcode, payload-length, etc) and the payload of other frame types (PING, PONG, CLOSE).
If the websocket was created with manual_window_management set false, this function does nothing.
This function may be called from any thread.
Prototype
void aws_websocket_increment_read_window(struct aws_websocket *websocket, size_t size);LibAwsHTTP.aws_websocket_is_data_frame — Method
aws_websocket_is_data_frame(opcode)Return true if opcode is for a data frame, false if opcode if for a control frame.
Prototype
bool aws_websocket_is_data_frame(uint8_t opcode);LibAwsHTTP.aws_websocket_random_handshake_key — Method
aws_websocket_random_handshake_key(dst)Generate value for a Sec-WebSocket-Key header and write it into dst buffer. The buffer should have at least AWS_WEBSOCKET_MAX_HANDSHAKE_KEY_LENGTH space available.
This value is the base64 encoding of a random 16-byte value. RFC-6455 Section 4.1
Prototype
int aws_websocket_random_handshake_key(struct aws_byte_buf *dst);LibAwsHTTP.aws_websocket_release — Method
aws_websocket_release(websocket)Decrement the websocket's ref-count. When the ref-count reaches zero, the connection will shut down, if it hasn't already. Users must release the websocket when they are done with it. The websocket's memory cannot be reclaimed until this is done. Callbacks may continue firing after this is called, with "shutdown" being the final callback. This function may be called from any thread.
It is safe to pass NULL, nothing will happen.
Prototype
void aws_websocket_release(struct aws_websocket *websocket);LibAwsHTTP.aws_websocket_send_frame — Method
aws_websocket_send_frame(websocket, options)Send a websocket frame. The options struct is copied. A callback will be invoked when the operation completes. This function may be called from any thread.
Prototype
int aws_websocket_send_frame(struct aws_websocket *websocket, const struct aws_websocket_send_frame_options *options);