pub struct WsTransportClientBuilder {
pub certificate_store: CertificateStore,
pub connection_timeout: Duration,
pub headers: HeaderMap,
pub max_request_body_size: u32,
pub max_redirections: usize,
}
Expand description
Builder for a WebSocket transport Sender
and [’Receiver`] pair.
Fields§
§certificate_store: CertificateStore
What certificate store to use
connection_timeout: Duration
Timeout for the connection.
headers: HeaderMap
Custom headers to pass during the HTTP handshake.
max_request_body_size: u32
Max payload size
max_redirections: usize
Max number of redirections.
Implementations§
source§impl WsTransportClientBuilder
impl WsTransportClientBuilder
sourcepub fn certificate_store(self, certificate_store: CertificateStore) -> Self
pub fn certificate_store(self, certificate_store: CertificateStore) -> Self
Set whether to use system certificates (default is native).
sourcepub fn max_request_body_size(self, size: u32) -> Self
pub fn max_request_body_size(self, size: u32) -> Self
Set max request body size (default is 10 MB).
sourcepub fn connection_timeout(self, timeout: Duration) -> Self
pub fn connection_timeout(self, timeout: Duration) -> Self
Set connection timeout for the handshake (default is 10 seconds).
sourcepub fn set_headers(self, headers: HeaderMap) -> Self
pub fn set_headers(self, headers: HeaderMap) -> Self
Set a custom header passed to the server during the handshake (default is none).
The caller is responsible for checking that the headers do not conflict or are duplicated.
sourcepub fn max_redirections(self, redirect: usize) -> Self
pub fn max_redirections(self, redirect: usize) -> Self
Set the max number of redirections to perform until a connection is regarded as failed. (default is 5).