#[repr(C)]pub struct aws_socket_channel_bootstrap_options {
pub bootstrap: *mut aws_client_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 creation_callback: aws_client_bootstrap_on_channel_event_fn,
pub setup_callback: aws_client_bootstrap_on_channel_event_fn,
pub shutdown_callback: aws_client_bootstrap_on_channel_event_fn,
pub enable_read_back_pressure: bool,
pub user_data: *mut c_void,
pub requested_event_loop: *mut aws_event_loop,
}
Expand description
Socket-based channel creation options.
bootstrap - configs name resolution and which event loop group the connection will be seated into host_name - host to connect to; if a dns address, will be resolved prior to connecting port - port to connect to socket_options - socket properties, including type (tcp vs. udp vs. unix domain) and connect timeout. TLS connections are currently restricted to tcp (AWS_SOCKET_STREAM) only. tls_options - (optional) tls context to apply after connection establishment. If NULL, the connection will not be protected by TLS. creation_callback - (optional) callback invoked when the channel is first created. This is always right after the connection was successfully established. Does NOT get called if the initial connect failed. setup_callback - callback invoked once the channel is ready for use and TLS has been negotiated or if an error is encountered shutdown_callback - callback invoked once the channel has shutdown. enable_read_back_pressure - controls whether or not back pressure will be applied in the channel user_data - arbitrary data to pass back to the various callbacks requested_event_loop - if set, the connection will be placed on the requested event loop rather than one chosen internally from the bootstrap’s associated event loop group. It is an error to pass in an event loop that is not associated with the bootstrap’s event loop group.
Immediately after the shutdown_callback
returns, the channel is cleaned up automatically. All callbacks are invoked
in the thread of the event-loop that the new channel is assigned to.
Fields
bootstrap: *mut aws_client_bootstrap
host_name: *const c_char
port: u16
socket_options: *const aws_socket_options
tls_options: *const aws_tls_connection_options
creation_callback: aws_client_bootstrap_on_channel_event_fn
setup_callback: aws_client_bootstrap_on_channel_event_fn
shutdown_callback: aws_client_bootstrap_on_channel_event_fn
enable_read_back_pressure: bool
user_data: *mut c_void
requested_event_loop: *mut aws_event_loop
Trait Implementations
sourceimpl Clone for aws_socket_channel_bootstrap_options
impl Clone for aws_socket_channel_bootstrap_options
sourcefn clone(&self) -> aws_socket_channel_bootstrap_options
fn clone(&self) -> aws_socket_channel_bootstrap_options
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more