#[repr(C)]pub struct aws_server_socket_channel_bootstrap_options {
pub bootstrap: *mut aws_server_bootstrap,
pub host_name: *const c_char,
pub port: u16,
pub socket_options: *const aws_socket_options,
pub tls_options: *const aws_tls_connection_options,
pub incoming_callback: aws_server_bootstrap_on_accept_channel_setup_fn,
pub shutdown_callback: aws_server_bootstrap_on_accept_channel_shutdown_fn,
pub destroy_callback: aws_server_bootstrap_on_server_listener_destroy_fn,
pub enable_read_back_pressure: bool,
pub user_data: *mut c_void,
}
Expand description
Arguments to setup a server socket listener which will also negotiate and configure TLS.
This creates a socket listener bound to host
and ‘port’ using socket options options
, and TLS options
tls_options
. incoming_callback
will be invoked once an incoming channel is ready for use and TLS is
finished negotiating, or if an error is encountered. shutdown_callback
will be invoked once the channel has
shutdown. destroy_callback
will be invoked after the server socket listener is destroyed, and all associated
connections and channels have finished shutting down. Immediately after the shutdown_callback
returns, the channel
is cleaned up automatically. All callbacks are invoked in the thread of the event-loop that listener is assigned to.
Upon shutdown of your application, you’ll want to call aws_server_bootstrap_destroy_socket_listener
with the return
value from this function.
The socket type in options
must be AWS_SOCKET_STREAM if tls_options is set.
DTLS is not currently supported for tls.
Fields
bootstrap: *mut aws_server_bootstrap
host_name: *const c_char
port: u16
socket_options: *const aws_socket_options
tls_options: *const aws_tls_connection_options
incoming_callback: aws_server_bootstrap_on_accept_channel_setup_fn
shutdown_callback: aws_server_bootstrap_on_accept_channel_shutdown_fn
destroy_callback: aws_server_bootstrap_on_server_listener_destroy_fn
enable_read_back_pressure: bool
user_data: *mut c_void
Trait Implementations
sourceimpl Clone for aws_server_socket_channel_bootstrap_options
impl Clone for aws_server_socket_channel_bootstrap_options
sourcefn clone(&self) -> aws_server_socket_channel_bootstrap_options
fn clone(&self) -> aws_server_socket_channel_bootstrap_options
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more