![]() |
OnSocketReceive() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Protected Function |
Declared in: DNSUDPSocket.h |
virtual BOOL OnSocketReceive( int iErrorCode);
Receive the data
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)
![]() |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |