Struct tk_http::server::Config
[−]
[src]
pub struct Config { /* fields omitted */ }Fine-grained configuration of the HTTP server
Methods
impl Config[src]
pub fn new() -> Config[src]
Create a config with defaults
pub fn inflight_request_limit(&mut self, value: usize) -> &mut Self[src]
A number of inflight requests until we stop reading more requests
pub fn inflight_request_prealoc(&mut self, value: usize) -> &mut Self[src]
Size of the queue that is preallocated for holding requests
Should be smaller than inflight_request_limit.
pub fn done(&mut self) -> Arc<Config>[src]
Create a Arc'd config clone to pass to the constructor
This is just a convenience method.
pub fn first_byte_timeout(&mut self, value: Duration) -> &mut Self[src]
Timeout receiving very first byte over connection
pub fn keep_alive_timeout(&mut self, value: Duration) -> &mut Self[src]
Timeout of idle connection (when no request has been sent yet)
pub fn headers_timeout(&mut self, value: Duration) -> &mut Self[src]
Timeout of receiving whole request headers
This timeout starts when first byte of headers is received
pub fn input_body_byte_timeout(&mut self, value: Duration) -> &mut Self[src]
Maximum delay between any two bytes of input request received
pub fn input_body_whole_timeout(&mut self, value: Duration) -> &mut Self[src]
Timeout of whole request body received
This timeout might be adjusted on per-request basis in
headers_received.
pub fn output_body_byte_timeout(&mut self, value: Duration) -> &mut Self[src]
Maximum delay between any two bytes of the output request could be sent
pub fn output_body_whole_timeout(&mut self, value: Duration) -> &mut Self[src]
Timeout for the whole response body to be send to the client
This timeout is taken literally for any response, so it must be as large as needed for slowest client fetching slowest file. I.e. it might be as big as a hour or day for some applications, but consider short timeouts if you don't serve large files to prevent DoS attacks.
Trait Implementations
impl Debug for Config[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more