![]() |
SocketDone() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Protected Function |
Declared in: TCPPortScanner.h |
Declaration
void SocketDone(
unsigned short usPort,
BOOL bConnected);
DescriptionWhen socket is done
Function Body
try
{
if (m_bDone ||
m_bFinished)
return;
//Only if connected
if (bConnected)
{
//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);
}
//Inicate for user
OnPort(usPort,
bConnected);
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")
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. |