public ArrayList<Integer> doScan(){
  cancelled=false;
  ArrayList<Integer> openPorts=new ArrayList<>();
  for (  int portNo : ports) {
    if (PortScanTCP.scanAddress(address,portNo,timeOutMillis)) {
      openPorts.add(portNo);
    }
    if (cancelled)     break;
  }
  return openPorts;
}

public ArrayList < Integer > doScan ( ) { cancelled = false ; ArrayList < Integer > openPorts = new ArrayList < > ( ) ; for ( int portNo : ports ) { if ( PortScanTCP . scanAddress ( address , portNo , timeOutMillis ) ) { openPorts . add ( portNo ) ; } if ( cancelled ) break ; } return openPorts ; }
perform a synchrnous port scan and return a list of open ports
