#[repr(C)]
pub struct aws_http_client_connection_options {
Show 20 fields pub self_size: usize, pub allocator: *mut aws_allocator, pub bootstrap: *mut aws_client_bootstrap, pub host_name: aws_byte_cursor, pub port: u16, pub socket_options: *const aws_socket_options, pub tls_options: *const aws_tls_connection_options, pub proxy_options: *const aws_http_proxy_options, pub proxy_ev_settings: *const proxy_env_var_settings, pub monitoring_options: *const aws_http_connection_monitoring_options, pub manual_window_management: bool, pub initial_window_size: usize, pub user_data: *mut c_void, pub on_setup: aws_http_on_client_connection_setup_fn, pub on_shutdown: aws_http_on_client_connection_shutdown_fn, pub prior_knowledge_http2: bool, pub alpn_string_map: *mut aws_hash_table, pub http1_options: *const aws_http1_connection_options, pub http2_options: *const aws_http2_connection_options, pub requested_event_loop: *mut aws_event_loop,
}
Expand description

Options for creating an HTTP client connection. Initialize with AWS_HTTP_CLIENT_CONNECTION_OPTIONS_INIT to set default values.

Fields

self_size: usize

The sizeof() this struct, used for versioning. Set by AWS_HTTP_CLIENT_CONNECTION_OPTIONS_INIT.

allocator: *mut aws_allocator

Required. Must outlive the connection.

bootstrap: *mut aws_client_bootstrap

Required. Must outlive the connection.

host_name: aws_byte_cursor

Required. aws_http_client_connect() makes a copy.

port: u16

Required.

socket_options: *const aws_socket_options

Required. aws_http_client_connect() makes a copy.

tls_options: *const aws_tls_connection_options

Optional. aws_http_client_connect() deep-copies all contents except the aws_tls_ctx, which must outlive the the connection.

proxy_options: *const aws_http_proxy_options

Optional Configuration options related to http proxy usage. Relevant fields are copied internally.

proxy_ev_settings: *const proxy_env_var_settingsmonitoring_options: *const aws_http_connection_monitoring_options

Optional Configuration options related to connection health monitoring

manual_window_management: bool

Set to true to manually manage the flow-control window of each stream.

If false, the connection will maintain its flow-control windows such that no back-pressure is applied and data arrives as fast as possible.

If 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). initial_window_size determines the starting size of each stream’s window for HTTP/1 stream, while HTTP/2 stream will use the settings AWS_HTTP2_SETTINGS_INITIAL_WINDOW_SIZE to inform the other side about read back pressure

If a stream’s flow-control window reaches 0, no further data will be received. The user must call aws_http_stream_update_window() to increment the stream’s window and keep data flowing.

If a HTTP/2 connection created, it will ONLY control the stream window management. Connection window management is controlled by conn_manual_window_management. Note: the padding of data frame counts to the flow-control window. But, the client will always automatically update the window for padding even for manual window update.

initial_window_size: usize

The starting size of each HTTP stream’s flow-control window for HTTP/1 connection. Required if manual_window_management is true, ignored if manual_window_management is false.

Always ignored when HTTP/2 connection created. The initial window size is controlled by the settings, AWS_HTTP2_SETTINGS_INITIAL_WINDOW_SIZE

user_data: *mut c_void

User data for callbacks Optional.

on_setup: aws_http_on_client_connection_setup_fn

Invoked when connect completes. Required. See aws_http_on_client_connection_setup_fn.

on_shutdown: aws_http_on_client_connection_shutdown_fn

Invoked when the connection has finished shutting down. Never invoked if setup failed. Optional. See aws_http_on_client_connection_shutdown_fn.

prior_knowledge_http2: bool

Optional. When true, use prior knowledge to set up an HTTP/2 connection on a cleartext connection. When TLS is set and this is true, the connection will failed to be established, as prior knowledge only works for cleartext TLS. Refer to RFC7540 3.4

alpn_string_map: *mut aws_hash_table

Optional. Pointer to the hash map containing the ALPN string to protocol to use. Hash from struct aws_string * to enum aws_http_version. If not set, only the predefined string h2 and http/1.1 will be recognized. Other negotiated ALPN string will result in a HTTP1/1 connection Note: Connection will keep a deep copy of the table and the strings.

http1_options: *const aws_http1_connection_options

Options specific to HTTP/1.x connections. Optional. Ignored if connection is not HTTP/1.x. If connection is HTTP/1.x and options were not specified, default values are used.

http2_options: *const aws_http2_connection_options

Options specific to HTTP/2 connections. Optional. Ignored if connection is not HTTP/2. If connection is HTTP/2 and options were not specified, default values are used.

requested_event_loop: *mut aws_event_loop

Optional. Requests the channel/connection be bound to a specific event loop rather than chosen sequentially from the event loop group associated with the client bootstrap.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.