#[repr(C)]pub struct esp_websocket_client_config_t {Show 31 fields
pub uri: *const c_char,
pub host: *const c_char,
pub port: c_int,
pub username: *const c_char,
pub password: *const c_char,
pub path: *const c_char,
pub disable_auto_reconnect: bool,
pub user_context: *mut c_void,
pub task_prio: c_int,
pub task_stack: c_int,
pub buffer_size: c_int,
pub cert_pem: *const c_char,
pub cert_len: usize,
pub client_cert: *const c_char,
pub client_cert_len: usize,
pub client_key: *const c_char,
pub client_key_len: usize,
pub transport: esp_websocket_transport_t,
pub subprotocol: *const c_char,
pub user_agent: *const c_char,
pub headers: *const c_char,
pub pingpong_timeout_sec: c_int,
pub disable_pingpong_discon: bool,
pub use_global_ca_store: bool,
pub skip_cert_common_name_check: bool,
pub keep_alive_enable: bool,
pub keep_alive_idle: c_int,
pub keep_alive_interval: c_int,
pub keep_alive_count: c_int,
pub ping_interval_sec: usize,
pub if_name: *mut ifreq,
}
Expand description
@brief Websocket client setup configuration
Fields
uri: *const c_char
< Websocket URI, the information on the URI can be overrides the other fields below, if any
host: *const c_char
< Domain or IP as string
port: c_int
< Port to connect, default depend on esp_websocket_transport_t (80 or 443)
username: *const c_char
< Using for Http authentication - Not supported for now
password: *const c_char
< Using for Http authentication - Not supported for now
path: *const c_char
< HTTP Path, if not set, default is /
disable_auto_reconnect: bool
< Disable the automatic reconnect function when disconnected
user_context: *mut c_void
< HTTP user data context
task_prio: c_int
< Websocket task priority
task_stack: c_int
< Websocket task stack
buffer_size: c_int
< Websocket buffer size
cert_pem: *const c_char
< Pointer to certificate data in PEM or DER format for server verify (with SSL), default is NULL, not required to verify the server. PEM-format must have a terminating NULL-character. DER-format requires the length to be passed in cert_len.
cert_len: usize
< Length of the buffer pointed to by cert_pem. May be 0 for null-terminated pem
client_cert: *const c_char
< Pointer to certificate data in PEM or DER format for SSL mutual authentication, default is NULL, not required if mutual authentication is not needed. If it is not NULL, also client_key
has to be provided. PEM-format must have a terminating NULL-character. DER-format requires the length to be passed in client_cert_len.
client_cert_len: usize
< Length of the buffer pointed to by client_cert. May be 0 for null-terminated pem
client_key: *const c_char
< Pointer to private key data in PEM or DER format for SSL mutual authentication, default is NULL, not required if mutual authentication is not needed. If it is not NULL, also client_cert
has to be provided. PEM-format must have a terminating NULL-character. DER-format requires the length to be passed in client_key_len
client_key_len: usize
< Length of the buffer pointed to by client_key_pem. May be 0 for null-terminated pem
transport: esp_websocket_transport_t
< Websocket transport type, see `esp_websocket_transport_t
subprotocol: *const c_char
< Websocket subprotocol
user_agent: *const c_char
< Websocket user-agent
headers: *const c_char
< Websocket additional headers
pingpong_timeout_sec: c_int
< Period before connection is aborted due to no PONGs received
disable_pingpong_discon: bool
< Disable auto-disconnect due to no PONG received within pingpong_timeout_sec
use_global_ca_store: bool
< Use a global ca_store for all the connections in which this bool is set.
skip_cert_common_name_check: bool
< Skip any validation of server certificate CN field
keep_alive_enable: bool
< Enable keep-alive timeout
keep_alive_idle: c_int
< Keep-alive idle time. Default is 5 (second)
keep_alive_interval: c_int
< Keep-alive interval time. Default is 5 (second)
keep_alive_count: c_int
< Keep-alive packet retry send count. Default is 3 counts
ping_interval_sec: usize
< Websocket ping interval, defaults to 10 seconds if not set
if_name: *mut ifreq
< The name of interface for data to go through. Use the default interface without setting
Trait Implementations
sourceimpl Clone for esp_websocket_client_config_t
impl Clone for esp_websocket_client_config_t
sourcefn clone(&self) -> esp_websocket_client_config_t
fn clone(&self) -> esp_websocket_client_config_t
Returns a copy of the value. Read more
1.0.0fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for esp_websocket_client_config_t
impl Debug for esp_websocket_client_config_t
sourceimpl Default for esp_websocket_client_config_t
impl Default for esp_websocket_client_config_t
impl Copy for esp_websocket_client_config_t
Auto Trait Implementations
impl RefUnwindSafe for esp_websocket_client_config_t
impl !Send for esp_websocket_client_config_t
impl !Sync for esp_websocket_client_config_t
impl Unpin for esp_websocket_client_config_t
impl UnwindSafe for esp_websocket_client_config_t
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more