[−][src]Struct quiche::Config
Stores configuration shared between multiple connections.
Methods
impl Config
[src]
pub fn new(version: u32) -> Result<Config>
[src]
Creates a config object with the given version.
Examples:
let config = quiche::Config::new(quiche::PROTOCOL_VERSION)?;
pub fn load_cert_chain_from_pem_file(&mut self, file: &str) -> Result<()>
[src]
Configures the given certificate chain.
The content of file
is parsed as a PEM-encoded leaf certificate,
followed by optional intermediate certificates.
Examples:
config.load_cert_chain_from_pem_file("/path/to/cert.pem")?;
pub fn load_priv_key_from_pem_file(&mut self, file: &str) -> Result<()>
[src]
Configures the given private key.
The content of file
is parsed as a PEM-encoded private key.
Examples:
config.load_priv_key_from_pem_file("/path/to/key.pem")?;
pub fn verify_peer(&mut self, verify: bool)
[src]
Configures whether to verify the peer's certificate.
The default value is true
for client connections, and false
for
server ones.
pub fn grease(&mut self, grease: bool)
[src]
Configures whether to send GREASE values.
The default value is true
.
pub fn log_keys(&mut self)
[src]
Enables logging of secrets.
A connection's cryptographic secrets will be logged in the keylog
format in the file pointed to by the SSLKEYLOGFILE
environment
variable.
pub fn set_application_protos(&mut self, protos: &[u8]) -> Result<()>
[src]
Configures the list of supported application protocols.
The list of protocols protos
must be in wire-format (i.e. a series
of non-empty, 8-bit length-prefixed strings).
On the client this configures the list of protocols to send to the server as part of the ALPN extension.
On the server this configures the list of supported protocols to match against the client-supplied list.
Applications must set a value, but no default is provided.
Examples:
config.set_application_protos(b"\x08http/1.1\x08http/0.9")?;
pub fn set_idle_timeout(&mut self, v: u64)
[src]
Sets the idle_timeout
transport parameter.
By default no timeout is used.
pub fn set_max_packet_size(&mut self, v: u64)
[src]
Sets the max_packet_size transport
parameter.
The default value is 65527
.
pub fn set_initial_max_data(&mut self, v: u64)
[src]
Sets the initial_max_data
transport parameter.
The default value is 0
.
pub fn set_initial_max_stream_data_bidi_local(&mut self, v: u64)
[src]
Sets the initial_max_stream_data_bidi_local
transport parameter.
The default value is 0
.
pub fn set_initial_max_stream_data_bidi_remote(&mut self, v: u64)
[src]
Sets the initial_max_stream_data_bidi_remote
transport parameter.
The default value is 0
.
pub fn set_initial_max_stream_data_uni(&mut self, v: u64)
[src]
Sets the initial_max_stream_data_uni
transport parameter.
The default value is 0
.
pub fn set_initial_max_streams_bidi(&mut self, v: u64)
[src]
Sets the initial_max_streams_bidi
transport parameter.
The default value is 0
.
pub fn set_initial_max_streams_uni(&mut self, v: u64)
[src]
Sets the initial_max_streams_uni
transport parameter.
The default value is 0
.
pub fn set_ack_delay_exponent(&mut self, v: u64)
[src]
Sets the ack_delay_exponent
transport parameter.
The default value is 3
.
pub fn set_max_ack_delay(&mut self, v: u64)
[src]
Sets the max_ack_delay
transport parameter.
The default value is 25
.
pub fn set_disable_active_migration(&mut self, v: bool)
[src]
Sets the disable_active_migration
transport parameter.
The default value is false
.
Auto Trait Implementations
impl Send for Config
impl Unpin for Config
impl !Sync for Config
impl UnwindSafe for Config
impl RefUnwindSafe for Config
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,