UClient_Base::UClient_Base(UFileConfig* pcfg) : response(U_CAPACITY), buffer(U_CAPACITY), host_port(100U) { U_TRACE_REGISTER_OBJECT(0, UClient_Base, "%p", pcfg) if (u_hostname_len == 0) { u_init_ulib_hostname(); u_init_ulib_username(); } socket = 0; port = verify_mode = iovcnt = 0; timeoutMS = U_TIMEOUT_MS; (void) memset(iov, 0, sizeof(struct iovec) * 6); if (pcfg) { if (cfg == 0) { cfg = pcfg; cfg->load(); } if (cfg->empty() == false) loadConfigParam(); } }
UClient_Base::UClient_Base(UFileConfig* cfg) : response(U_CAPACITY), buffer(U_CAPACITY), host_port(100U) { U_TRACE_REGISTER_OBJECT(0, UClient_Base, "%p", cfg) u_init_ulib_hostname(); U_INTERNAL_DUMP("u_hostname(%u) = %.*S", u_hostname_len, u_hostname_len, u_hostname) u_init_ulib_username(); U_INTERNAL_DUMP("u_user_name(%u) = %.*S", u_user_name_len, u_user_name_len, u_user_name) timeoutMS = U_TIMEOUT_MS; if (cfg) loadConfigParam(*cfg); else { bIPv6 = false; port = verify_mode = 0; } }