try
{
//No server yet
m_aServer=wsNone;
//Are we async
if (!m_bAsync)
{
//Try to get the data
for (int iCounter=wsRipe;
iCounter>wsNone;
--iCounter)
{
//Try to get the data
if (!WhoisIP(aAddress,m_aIPWhois[iCounter]))
{
//Error
ReportError("WhoisIP","Failed getting data from server!");
//Exit
return FALSE;
}
//Try to analyze it
if (m_sWhoisData.find(m_aWhoisNotFound[iCounter])==std::string::npos)
{
//We have it
m_aServer=(WhoisServer)iCounter;
//Exit
return TRUE;
}
}
//Didn't found it
return FALSE;
}
else
{
//Set the current server
m_aProgress=wsRipe;
//Connect
return WhoisIP(aAddress,m_aIPWhois[m_aProgress]);
}
}
ERROR_HANDLER_RETURN("WhoisIP",FALSE)