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