Struct tk_http::server::Config [] [src]

pub struct Config { /* fields omitted */ }

Fine-grained configuration of the HTTP server

Methods

impl Config
[src]

Create a config with defaults

A number of inflight requests until we stop reading more requests

Size of the queue that is preallocated for holding requests

Should be smaller than inflight_request_limit.

Create a Arc'd config clone to pass to the constructor

This is just a convenience method.

Timeout receiving very first byte over connection

Timeout of idle connection (when no request has been sent yet)

Timeout of receiving whole request headers

This timeout starts when first byte of headers is received

Maximum delay between any two bytes of input request received

Timeout of whole request body received

This timeout might be adjusted on per-request basis in headers_received.

Maximum delay between any two bytes of the output request could be sent

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]

Formats the value using the given formatter.

impl Clone for Config
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more