![]() |
Receive() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Public Function |
Declared in: DNSSocket.h |
DeclarationCDNSAnswers * Receive();
DescriptionReceive for block sockets
Function Body
if (m_bAsync)
return NULL; //We will receive it later
try
{
//Here we initialize the receive of the DNS
char* pBuffer;
pBuffer=new char[2000];
//How much data did we receive
int iReceived=0;
if (m_bUseTCP)
iReceived=m_pTCP->Receive(pBuffer,
2000);
else
iReceived=m_pUDP->Receive(pBuffer,
2000);
//Check if we had errors
if (iReceived==CSpoofBase::GetErrorCode() ||
!iReceived)
{
//Delete the memory
delete [] pBuffer;
//Done
return FALSE;
}
//Parse it
return SocketReceive(pBuffer,
iReceived,
m_bUseTCP);
}
ERROR_HANDLER_RETURN("Receive",NULL)
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. |