pub struct HttpServiceConfig<const HEADER_LIMIT: usize = DEFAULT_HEADER_LIMIT, const READ_BUF_LIMIT: usize = DEFAULT_READ_BUF_LIMIT, const WRITE_BUF_LIMIT: usize = DEFAULT_WRITE_BUF_LIMIT> { /* private fields */ }
Implementations§
Source§impl<const HEADER_LIMIT: usize, const READ_BUF_LIMIT: usize, const WRITE_BUF_LIMIT: usize> HttpServiceConfig<HEADER_LIMIT, READ_BUF_LIMIT, WRITE_BUF_LIMIT>
impl<const HEADER_LIMIT: usize, const READ_BUF_LIMIT: usize, const WRITE_BUF_LIMIT: usize> HttpServiceConfig<HEADER_LIMIT, READ_BUF_LIMIT, WRITE_BUF_LIMIT>
Sourcepub fn disable_vectored_write(self) -> Self
pub fn disable_vectored_write(self) -> Self
Disable vectored write even when IO is able to perform it.
This is beneficial when dealing with small size of response body.
Sourcepub fn keep_alive_timeout(self, dur: Duration) -> Self
pub fn keep_alive_timeout(self, dur: Duration) -> Self
Define duration of how long an idle connection is kept alive.
connection have not done any IO after duration would be closed. IO operation can possibly result in reset of the duration.
Sourcepub fn request_head_timeout(self, dur: Duration) -> Self
pub fn request_head_timeout(self, dur: Duration) -> Self
Define duration of how long a connection must finish it’s request head transferring. starting from first byte(s) of current request(s) received from peer.
connection can not make a single request after duration would be closed.
Sourcepub fn tls_accept_timeout(self, dur: Duration) -> Self
pub fn tls_accept_timeout(self, dur: Duration) -> Self
Define duration of how long a connection must finish it’s tls handshake. (If tls is enabled)
Connection can not finish handshake after duration would be closed.
Sourcepub fn max_read_buf_size<const READ_BUF_LIMIT_2: usize>(
self,
) -> HttpServiceConfig<HEADER_LIMIT, READ_BUF_LIMIT_2, WRITE_BUF_LIMIT>
pub fn max_read_buf_size<const READ_BUF_LIMIT_2: usize>( self, ) -> HttpServiceConfig<HEADER_LIMIT, READ_BUF_LIMIT_2, WRITE_BUF_LIMIT>
Define max read buffer size for a connection.
See DEFAULT_READ_BUF_LIMIT for default value and behavior.
Sourcepub fn max_write_buf_size<const WRITE_BUF_LIMIT_2: usize>(
self,
) -> HttpServiceConfig<HEADER_LIMIT, READ_BUF_LIMIT, WRITE_BUF_LIMIT_2>
pub fn max_write_buf_size<const WRITE_BUF_LIMIT_2: usize>( self, ) -> HttpServiceConfig<HEADER_LIMIT, READ_BUF_LIMIT, WRITE_BUF_LIMIT_2>
Define max write buffer size for a connection.
See DEFAULT_WRITE_BUF_LIMIT for default value and behavior.
Sourcepub fn max_request_headers<const HEADER_LIMIT_2: usize>(
self,
) -> HttpServiceConfig<HEADER_LIMIT_2, READ_BUF_LIMIT, WRITE_BUF_LIMIT>
pub fn max_request_headers<const HEADER_LIMIT_2: usize>( self, ) -> HttpServiceConfig<HEADER_LIMIT_2, READ_BUF_LIMIT, WRITE_BUF_LIMIT>
Define max request header count for a connection.
See DEFAULT_HEADER_LIMIT for default value and behavior.
Sourcepub fn peek_protocol(self) -> Self
pub fn peek_protocol(self) -> Self
Enable peek into connection to figure out it’s protocol regardless the outcome of alpn negotiation.
This API is used to bypass alpn setting from tls and enable Http/2 protocol over plain Tcp connection.
Trait Implementations§
Source§impl<const HEADER_LIMIT: usize, const READ_BUF_LIMIT: usize, const WRITE_BUF_LIMIT: usize> Clone for HttpServiceConfig<HEADER_LIMIT, READ_BUF_LIMIT, WRITE_BUF_LIMIT>
impl<const HEADER_LIMIT: usize, const READ_BUF_LIMIT: usize, const WRITE_BUF_LIMIT: usize> Clone for HttpServiceConfig<HEADER_LIMIT, READ_BUF_LIMIT, WRITE_BUF_LIMIT>
Source§fn clone(
&self,
) -> HttpServiceConfig<HEADER_LIMIT, READ_BUF_LIMIT, WRITE_BUF_LIMIT>
fn clone( &self, ) -> HttpServiceConfig<HEADER_LIMIT, READ_BUF_LIMIT, WRITE_BUF_LIMIT>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more