pub fn new(
        keep_alive: KeepAlive,
        client_timeout: u64,
        client_disconnect: u64,
        ssl_handshake_timeout: u64,
    ) -> ServiceConfig {
        let (keep_alive, ka_enabled) = match keep_alive {
            KeepAlive::Timeout(val) => (val as u64, true),
            KeepAlive::Os => (0, true),
            KeepAlive::Disabled => (0, false),
        };
        let keep_alive = if ka_enabled && keep_alive > 0 {
            Some(Duration::from_secs(keep_alive))
        } else {
            None
        };

        ServiceConfig(Rc::new(Inner {
            keep_alive,
            ka_enabled,
            client_timeout,
            client_disconnect,
            ssl_handshake_timeout,
            timer: DateService::new(),
        }))
    }
/// Create instance of `ServiceConfig`
Create instance of `ServiceConfig`
Create instance of ` ServiceConfig `
pub fn new(
        keep_alive: KeepAlive,
        client_timeout: u64,
        client_disconnect: u64,
        ssl_handshake_timeout: u64,
    ) -> ServiceConfig {
        let (keep_alive, ka_enabled) = match keep_alive {
            KeepAlive::Timeout(val) => (val as u64, true),
            KeepAlive::Os => (0, true),
            KeepAlive::Disabled => (0, false),
        };
        let keep_alive = if ka_enabled && keep_alive > 0 {
            Some(Duration::from_secs(keep_alive))
        } else {
            None
        };
        ServiceConfig(Rc::new(Inner {
            keep_alive,
            ka_enabled,
            client_timeout,
            client_disconnect,
            ssl_handshake_timeout,
            timer: DateService::new(),
        }))
    }
pub fn new ( keep_alive : KeepAlive , client_timeout : u64 , client_disconnect : u64 , ssl_handshake_timeout : u64 , ) -> ServiceConfig { let ( keep_alive , ka_enabled ) = match keep_alive { KeepAlive :: Timeout ( val ) => ( val as u64 , true ) , KeepAlive :: Os => ( 0 , true ) , KeepAlive :: Disabled => ( 0 , false ) , } ; let keep_alive = if ka_enabled && keep_alive > 0 { Some ( Duration :: from_secs ( keep_alive ) ) } else { None } ; ServiceConfig ( Rc :: new ( Inner { keep_alive , ka_enabled , client_timeout , client_disconnect , ssl_handshake_timeout , timer : DateService :: new ( ) , } ) ) }
Create instance of `ServiceConfig`
Create instance of ` ServiceConfig `
keep_alive
KeepAlive
client_timeout
u64
client_disconnect
u64
ssl_handshake_timeout
u64