![]() |
SocketDone() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Protected Function |
Declared in: TCPPortScanner.h |
void SocketDone( unsigned short usPort, char* pData, int iDataSize);
Socket done and received data
try { if (m_bDone || m_bFinished) return; { //Lock the data CCriticalAutoRelease aRelease(m_pCSection,TRUE); //Did we receive this answer already? if (m_aPortAnswers.find(usPort)!=m_aPortAnswers.end()) return; //Add it to the list m_aPortList.insert(usPort); //And to the existing ports m_aPortAnswers.insert(usPort); //Add the data to the map m_aPortsData.insert(DataMap::value_type(usPort,pData)); } //Inidicate for user OnPortData(usPort, pData, iDataSize); long lCount; lCount=AdjustNumberOfSockets(-1); //Decrease our count if (!CanScan() && lCount<=0) ScanDone(FALSE); else { //Quit flag BOOL bQuit; bQuit=FALSE; //Create the socket while (!bQuit) { //Adjust the number of sockets AdjustNumberOfSockets(1); //Allocate it if (!(bQuit=NewSocket())) ReportError("SocketDone","Error creating the socket!"); } } } ERROR_HANDLER("SocketDone")
![]() |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |