-struct hostent * he = NULL;
-he = gethostbyname(host.c_str());
-if (he == NULL)
- {
- throw std::runtime_error("gethostbyname error");
- }
-
-outerAddr.sin_family = AF_INET;
-outerAddr.sin_port = htons(port);
-outerAddr.sin_addr.s_addr = *(uint32_t *)he->h_addr;
-
-InitEncrypt();
-}
-//-----------------------------------------------------------------------------
-STG_CLIENT::~STG_CLIENT()
-{
-close(sock);
-}
-//-----------------------------------------------------------------------------
-uint32_t STG_CLIENT::GetFramedIP() const
-{
-return framedIP;
-}
-//-----------------------------------------------------------------------------
-inline
-void STG_CLIENT::InitEncrypt()
-{
-unsigned char keyL[RAD_PASSWORD_LEN];
-memset(keyL, 0, RAD_PASSWORD_LEN);
-strncpy((char *)keyL, password.c_str(), RAD_PASSWORD_LEN);
-Blowfish_Init(&ctx, keyL, RAD_PASSWORD_LEN);