Class CWhoisSocket::
GetWhoisServer()
Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: GetWhoisDataNext page: IsError    Show member index
Protected Function Declared in:
WhoisSocket.h

'Declaration' icon -- Shortcut to top of page. Declaration

const std::string & GetWhoisServer(
    const std::string& rURL) const;

'Function Body' icon -- Shortcut to top of page. Function Body

try
{
    //Get the last part of the address
    std::string::size_type aPos;
    aPos=rURL.find_last_of('.');

    //Do we have it
    if (aPos==std::string::npos)
        return m_sEmpty;

    //Check the size of the extension
    if (rURL.length()-aPos>4)
        return m_sEmpty;

    //Take it
    std::string::size_type aCopied;
    char aExtension[10];
    aCopied=rURL.copy(aExtension,rURL.length()-aPos-1,aPos+1);
    aExtension[aCopied]=0;

    //Convert it to upper case
    strupr(aExtension);

    //Copy it into a string
    std::string sExtension;
    sExtension=aExtension;

    //Look in the map
    WhoisMAP::const_iterator aIterator;
    aIterator=m_aData.find(sExtension);

    //Do we have it
    if (aIterator!=m_aData.end())
        return aIterator->second;
    else
        //Not found
        return m_sEmpty;
}
ERROR_HANDLER_RETURN("GetWhoisServer",m_sEmpty)

'See Also' icon -- Shortcut to top of page. See Also

Class Overview Class Overview  |  Public base class CTCPSocketAsync  |  Hierarchy Chart Hierarchy Chart


Get Surveyor!This web site was generated using Surveyor V4.50.811.1.  Click here for more information. Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003.