+int ClientSocket::GetTimeoutFromEnv() {
+ const char* timeout_str = getenv("PKGMGR_SOCKET_TIMEOUT");
+ if (timeout_str == nullptr)
+ return -1;
+
+ int timeout_msec = atoi(timeout_str);
+ if (timeout_msec <= 0)
+ return -1;
+
+ return timeout_msec;
+}
+