Enum hyper::net::HttpListener
[−]
[src]
pub enum HttpListener {
Http(TcpListener),
Https(TcpListener, Arc<SslContext>),
}A NetworkListener for HttpStreams.
Variants
Http | Http variant. |
Https | Https variant. The two paths point to the certificate and key PEM files, in that order. |
Methods
impl HttpListener
fn http<To: ToSocketAddrs>(addr: To) -> Result<HttpListener>
Start listening to an address over HTTP.
fn https<To: ToSocketAddrs>(addr: To, cert: &Path, key: &Path) -> Result<HttpListener>
Start listening to an address over HTTPS.
fn https_with_context<To: ToSocketAddrs>(addr: To, ssl_context: SslContext) -> Result<HttpListener>
Start listening to an address of HTTPS using the given SslContext