pub fn new(gs: Arc<GlobalState>, cert: &TlsPayload) -> Result<Self, Error> {
        // configures the SSL certificate with OpenSSL
        let acceptor =
            Self::create_openssl_acceptor(Arc::clone(&gs), cert).map_err(Error::Acceptor)?;

        // spawn the HTTP server and begin accepting requests
        let srv = spawn_http_server(Arc::clone(&gs), acceptor).map_err(Error::Port)?;

        Ok(Self { gs, actix: srv })
    }
/// Creates a new HTTP Server that will accept requests for the MD@Home client.
///
/// This will take the certificate it should use and the current global state and return a new
/// instance of `Self` if successful. Errors will be propagated up the stack.
Creates a new HTTP Server that will accept requests for the MD@Home client.
This will take the certificate it should use and the current global state and return a new
instance of `Self` if successful. Errors will be propagated up the stack.
Creates a new HTTP Server that will accept requests for the MD@Home client . This will take the certificate it should use and the current global state and return a new instance of ` Self ` if successful . Errors will be propagated up the stack .
pub fn new(gs: Arc<GlobalState>, cert: &TlsPayload) -> Result<Self, Error> {
        // configures the SSL certificate with OpenSSL
        let acceptor =
            Self::create_openssl_acceptor(Arc::clone(&gs), cert).map_err(Error::Acceptor)?;
        // spawn the HTTP server and begin accepting requests
        let srv = spawn_http_server(Arc::clone(&gs), acceptor).map_err(Error::Port)?;
        Ok(Self { gs, actix: srv })
    }
pub fn new ( gs : Arc < GlobalState > , cert : & TlsPayload ) -> Result < Self , Error > { // configures the SSL certificate with OpenSSL let acceptor = Self :: create_openssl_acceptor ( Arc :: clone ( & gs ) , cert ) . map_err ( Error :: Acceptor ) ? ; // spawn the HTTP server and begin accepting requests let srv = spawn_http_server ( Arc :: clone ( & gs ) , acceptor ) . map_err ( Error :: Port ) ? ; Ok ( Self { gs , actix : srv } ) }
Creates a new HTTP Server that will accept requests for the MD@Home client.
Creates a new HTTP Server that will accept requests for the MD@Home client .
gs
Arc<GlobalState>
cert
&TlsPayload