#[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
sourceimpl Clone for aws_http_server_options
impl Clone for aws_http_server_options
sourcefn clone(&self) -> aws_http_server_options
fn clone(&self) -> aws_http_server_options
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more