pub struct HttpServiceConfig { /* private fields */ }Expand description
Http service configuration
Implementations§
Source§impl HttpServiceConfig
impl HttpServiceConfig
Sourcepub fn new() -> HttpServiceConfig
pub fn new() -> HttpServiceConfig
Create instance of HttpServiceConfig
Sourcepub fn set_keepalive<W: Into<KeepAlive>>(self, val: W) -> Self
pub fn set_keepalive<W: Into<KeepAlive>>(self, val: W) -> Self
Set server keep-alive setting
By default keep alive is set to a 5 seconds.
Sourcepub fn set_keepalive_timeout(self, timeout: Seconds) -> Self
pub fn set_keepalive_timeout(self, timeout: Seconds) -> Self
Set keep-alive timeout in seconds.
To disable timeout set value to 0.
By default keep-alive timeout is set to 30 seconds.
Sourcepub fn set_client_timeout(self, timeout: Seconds) -> Self
pub fn set_client_timeout(self, timeout: Seconds) -> Self
Set request headers read timeout.
Defines a timeout for reading client request header. If a client does not transmit the entire set headers within this time, the request is terminated with the 408 (Request Time-out) error.
To disable timeout set value to 0.
By default client timeout is set to 3 seconds.
Sourcepub fn set_headers_read_rate(
self,
timeout: Seconds,
max_timeout: Seconds,
rate: u32,
) -> Self
pub fn set_headers_read_rate( self, timeout: Seconds, max_timeout: Seconds, rate: u32, ) -> Self
Set read rate parameters for request headers.
Set read timeout, max timeout and rate for reading request headers. If the client
sends rate amount of data within timeout period of time, extend timeout by timeout seconds.
But no more than max_timeout timeout.
By default headers read rate is set to 1sec with max timeout 5sec.
Sourcepub fn set_payload_read_rate(
self,
timeout: Seconds,
max_timeout: Seconds,
rate: u32,
) -> Self
pub fn set_payload_read_rate( self, timeout: Seconds, max_timeout: Seconds, rate: u32, ) -> Self
Set read rate parameters for request’s payload.
Set read timeout, max timeout and rate for reading payload. If the client
sends rate amount of data within timeout period of time, extend timeout by timeout seconds.
But no more than max_timeout timeout.
By default payload read rate is disabled.
Trait Implementations§
Source§impl Clone for HttpServiceConfig
impl Clone for HttpServiceConfig
Source§fn clone(&self) -> HttpServiceConfig
fn clone(&self) -> HttpServiceConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more