![]() |
ReceiveWhois() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Private Function |
Declared in: WhoisSocket.h |
DeclarationBOOL ReceiveWhois();
DescriptionReceive data from the whois
Function Body
try
{
//Receive the data
char aData[4000];
//Infinite loop
while (1)
{
//Get it
int iSize;
iSize=Receive(aData,sizeof(aData)/2-1);
//How much size
if (!iSize)
{
//Close the socket
if (!Close())
ReportError("ReceiveWhois","Failed to close socket!");
//Recreate it
if (!Create())
{
//Report it
ReportError("ReceiveWhois","Failed to create socket!");
//Exit
return FALSE;
}
//Do we need to get the additional server
if (m_bAdditionalServer)
m_sAdditionalWhoisServer=ExtractAdditionalWhoisServer(m_sWhoisData);
//Done
return TRUE;
}
//Is an error
if (iSize==GetErrorCode())
return FALSE;
//Remove nulls
for (int iCounter=0;
iCounter<iSize;
iCounter++)
if (!aData[iCounter])
aData[iCounter]=10;
//Set the terminating sero
aData[iSize]=0;
//Modify it
ModifyBuffer(aData,iSize+1);
//Add it to the string
m_sWhoisData+=aData;
}
//Done
return TRUE;
}
ERROR_HANDLER_RETURN("ReceiveWhois",FALSE)
See Also
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. |