Struct hyper::server::conn::AddrIncoming [−][src]
#[must_use = "streams do nothing unless polled"]pub struct AddrIncoming { /* fields omitted */ }
server
and (crate features http1
or http2
) only.Expand description
A stream of connections from binding to an address.
Implementations
This is supported on crate feature tcp
only.
tcp
only.Creates a new AddrIncoming
binding to provided socket address.
This is supported on crate feature tcp
only.
tcp
only.Creates a new AddrIncoming
from an existing tokio::net::TcpListener
.
This is supported on crate feature tcp
only.
tcp
only.Get the local address bound to this listener.
This is supported on crate feature tcp
only.
tcp
only.Set whether TCP keepalive messages are enabled on accepted connections.
If None
is specified, keepalive is disabled, otherwise the duration
specified will be the time to remain idle before sending TCP keepalive
probes.
This is supported on crate feature tcp
only.
tcp
only.Set the value of TCP_NODELAY
option for accepted connections.
This is supported on crate feature tcp
only.
tcp
only.Set whether to sleep on accept errors.
A possible scenario is that the process has hit the max open files
allowed, and so trying to accept a new connection will fail with
EMFILE
. In some cases, it’s preferable to just wait for some time, if
the application will likely close some files (or connections), and try
to accept the connection again. If this option is true
, the error
will be logged at the error
level, since it is still a big deal,
and then the listener will sleep for 1 second.
In other cases, hitting the max open files should be treat similarly
to being out-of-memory, and simply error (and shutdown). Setting
this option to false
will allow that.
Default is true
.
Trait Implementations
tcp
only.Auto Trait Implementations
impl !RefUnwindSafe for AddrIncoming
impl Send for AddrIncoming
impl Sync for AddrIncoming
impl Unpin for AddrIncoming
impl !UnwindSafe for AddrIncoming