question: private boolean airAppTerminated ( ProcessListener pl ) { if ( pl != null ) { if ( pl . isAIRApp ( ) ) { if ( pl . isProcessDead ( ) ) { return true ; } } } return false ; }
target:  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.