hyper_from_pem_data

Function hyper_from_pem_data 

Source
pub fn hyper_from_pem_data<'a>(
    cert: &'a [u8],
    key: &'a [u8],
    protocols: Protocols,
    addr: &SocketAddr,
) -> Result<Builder<TlsListener>, Error>
Expand description

The highest level function. Creates the Hyper server builder.

Certificates and key will be obtained from data. Protocols determines list of protocols that will be supported. Typical usage is:

let server = hyper_from_pem_data(cert_data, key_data, Protocols::ALL, &addr)?
            .serve(make_svc);