#[repr(C)]
pub struct aws_http_server_options { pub self_size: usize, pub allocator: *mut aws_allocator, pub bootstrap: *mut aws_server_bootstrap, pub endpoint: *mut aws_socket_endpoint, pub socket_options: *mut aws_socket_options, pub tls_options: *mut aws_tls_connection_options, pub initial_window_size: usize, pub server_user_data: *mut c_void, pub on_incoming_connection: aws_http_server_on_incoming_connection_fn, pub on_destroy_complete: aws_http_server_on_destroy_fn, pub manual_window_management: bool, }
Expand description

Options for creating an HTTP server. Initialize with AWS_HTTP_SERVER_OPTIONS_INIT to set default values.

Fields

self_size: usize

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

allocator: *mut aws_allocator

Required. Must outlive server.

bootstrap: *mut aws_server_bootstrap

Required. Must outlive server.

endpoint: *mut aws_socket_endpoint

Required. Server makes copy.

socket_options: *mut aws_socket_options

Required. Server makes a copy.

tls_options: *mut aws_tls_connection_options

Optional. Server copies all contents except the aws_tls_ctx, which must outlive the server.

initial_window_size: usize

Initial window size for incoming connections. Optional. A default size is set by AWS_HTTP_SERVER_OPTIONS_INIT.

server_user_data: *mut c_void

User data passed to callbacks. Optional.

on_incoming_connection: aws_http_server_on_incoming_connection_fn

Invoked when an incoming connection has been set up, or when setup has failed. Required. If setup succeeds, the user must call aws_http_connection_configure_server().

on_destroy_complete: aws_http_server_on_destroy_fn

Invoked when the server finishes the destroy operation. Optional.

manual_window_management: bool

Set to true to manually manage the read window size.

If this is false, the connection will maintain a constant window size.

If this is true, the caller must manually increment the window size using aws_http_stream_update_window(). If the window is not incremented, it will shrink by the amount of body data received. If the window size reaches 0, no further data will be received.

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.