![]() |
OnSocketReceive() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Protected Function |
Declared in: DNSUDPSocket.h |
Declaration
virtual BOOL OnSocketReceive(
int iErrorCode);
DescriptionReceive the data
Function Body
try
{
//Check if there's no error
if (!iErrorCode)
{
//Receive the data
char* pBuffer;
pBuffer=new char[2000];
//How much data did we receive
int iReceived=0;
//Receive
iReceived=Receive(pBuffer,2000);
//If every thing was OK
if (!iReceived)
{
//Dispose of the buffer
delete [] pBuffer;
//Inform of an error
m_pDNSSocket->SocketError(GetSystemLastError());
//Done
return TRUE;
}
//Inform our father
m_pDNSSocket->SocketReceive(pBuffer,
iReceived);
}
else
//Inform about the error
m_pDNSSocket->SocketError(iErrorCode);
//Always return true
return TRUE;
}
ERROR_HANDLER_RETURN("OnSocketReceive",TRUE)
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. |