private boolean airAppTerminated(ProcessListener pl){
  if (pl != null) {
    if (pl.isAIRApp()) {
      if (pl.isProcessDead()) {
        return true;
      }
    }
  }
  return false;
}

private boolean airAppTerminated ( ProcessListener pl ) { if ( pl != null ) { if ( pl . isAIRApp ( ) ) { if ( pl . isProcessDead ( ) ) { return true ; } } } return false ; }
returns true if the passed - in process listener is for an air application that has terminated . this is used by accept ( ) in order to detect that it should give up listening on the socket . the reason we can ' t do this for flash player - based apps is that unlike air apps , the process that we launched sometimes acts as just sort of a " launcher " process that terminates quickly , and the actual flash player is in some other process . for example , on mac , we often invoke the " open " program to open a web browser ; and on windows , if you launch firefox . exe but it detects that there is already a running instance of firefox . exe , the new instance will just pass a message to the old instance , and then the new instance will terminate .
