Struct hyper::net::HttpListener
[−]
[src]
pub struct HttpListener { /* fields omitted */ }
A NetworkListener
for HttpStream
s.
Methods
impl HttpListener
[src]
pub fn new<To: ToSocketAddrs>(addr: To) -> Result<HttpListener>
[src]
Start listening to an address over HTTP.
Trait Implementations
impl Clone for HttpListener
[src]
fn clone(&self) -> HttpListener
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl From<TcpListener> for HttpListener
[src]
fn from(listener: TcpListener) -> HttpListener
[src]
Performs the conversion.
impl NetworkListener for HttpListener
[src]
type Stream = HttpStream
The stream produced for each connection.
fn accept(&mut self) -> Result<HttpStream>
[src]
Returns an iterator of streams.
fn local_addr(&mut self) -> Result<SocketAddr>
[src]
Get the address this Listener ended up listening on.
fn set_read_timeout(&mut self, duration: Option<Duration>)
[src]
Sets the read timeout for all streams that are accepted
fn set_write_timeout(&mut self, duration: Option<Duration>)
[src]
Sets the write timeout for all streams that are accepted
ⓘImportant traits for NetworkConnections<'a, N>fn incoming(&mut self) -> NetworkConnections<Self>
[src]
ⓘImportant traits for NetworkConnections<'a, N>
Returns an iterator over incoming connections.
impl AsRawFd for HttpListener
[src]
impl FromRawFd for HttpListener
[src]
unsafe fn from_raw_fd(fd: RawFd) -> HttpListener
[src]
Constructs a new instance of Self
from the given raw file descriptor. Read more