![]() |
GetNextPort() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Protected Function |
Declared in: TCPPortScanner.h |
unsigned short GetNextPort();
Get the next port
try { //Lock the data CCriticalAutoRelease aRelease(m_pCSection,TRUE); //Do we have a pair if (!m_aCurrentPair.usFromPort || !m_aCurrentPair.usToPort || m_aCurrentPair.usFromPort>m_aCurrentPair.usToPort) //Get a pair if (m_aPortsToScan.begin()==m_aPortsToScan.end()) return 0; else { //Get the pair and remove it m_aCurrentPair=m_aPortsToScan.front(); m_aPortsToScan.pop_front(); } //Get the pair we want to send unsigned short usPort; usPort=m_aCurrentPair.usFromPort; //Increase the port ++m_aCurrentPair.usFromPort; //Done return usPort; } ERROR_HANDLER_RETURN("GetNextPort",0)
![]() |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |