[−][src]Trait rocket::http::hyper::net::NetworkListener
An abstraction to listen for connections on a certain port.
Associated Types
type Stream: NetworkStream + Send + Clone
The stream produced for each connection.
Required methods
fn accept(&mut self) -> Result<Self::Stream, Error>
Returns an iterator of streams.
fn local_addr(&mut self) -> Result<SocketAddr, Error>
Get the address this Listener ended up listening on.
Provided methods
ⓘImportant traits for NetworkConnections<'a, N>fn incoming(&mut self) -> NetworkConnections<Self>
ⓘImportant traits for NetworkConnections<'a, N>
Returns an iterator over incoming connections.
fn set_read_timeout(&mut self, Option<Duration>)
Sets the read timeout for all streams that are accepted
fn set_write_timeout(&mut self, Option<Duration>)
Sets the write timeout for all streams that are accepted
Implementors
impl NetworkListener for HttpListener
[src]
type Stream = HttpStream
fn accept(&mut self) -> Result<HttpStream, Error>
[src]
fn local_addr(&mut self) -> Result<SocketAddr, Error>
[src]
fn set_read_timeout(&mut self, duration: Option<Duration>)
[src]
fn set_write_timeout(&mut self, duration: Option<Duration>)
[src]
ⓘImportant traits for NetworkConnections<'a, N>fn incoming(&mut self) -> NetworkConnections<Self>
[src]
ⓘImportant traits for NetworkConnections<'a, N>
impl<S> NetworkListener for HttpsListener<S> where
S: SslServer<HttpStream> + Clone,
[src]
S: SslServer<HttpStream> + Clone,
type Stream = <S as SslServer<HttpStream>>::Stream
fn accept(&mut self) -> Result<<S as SslServer<HttpStream>>::Stream, Error>
[src]
fn local_addr(&mut self) -> Result<SocketAddr, Error>
[src]
fn set_read_timeout(&mut self, duration: Option<Duration>)
[src]
fn set_write_timeout(&mut self, duration: Option<Duration>)
[src]
ⓘImportant traits for NetworkConnections<'a, N>fn incoming(&mut self) -> NetworkConnections<Self>
[src]
ⓘImportant traits for NetworkConnections<'a, N>