![]() |
OnSocketReceive() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Protected Function |
Declared in: WhoisSocket.h |
virtual BOOL OnSocketReceive( int iErrorCode);
try { //Kill the timer KillTimer(); //Do we have an error if (iErrorCode) { //Report it ReportError("OnSocketReceive",iErrorCode); //We are done QueryDone(TRUE, TRUE); //Exit return FALSE; } //Receive the data char aData[4000]; //Get the data int iSize; iSize=Receive(aData,sizeof(aData)/2-1); //Is an error if (iSize==GetErrorCode()) { //We are done QueryDone(TRUE, TRUE); //Exit 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; //Reset the timeout SetTimeout(m_dwTimeout); //Done return TRUE; } ERROR_HANDLER_RETURN("OnSocketReceive",FALSE)
![]() |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |