apache/cordova-firefoxos — pull request #20 by nicola (2014-08-01 18:00:40+00:00)
Title: Discover b2g ports

This should be an helper library that should contain functions to find the port of an existing b2g simulator (Firefox OS simulator) and eventually functions to start a new simulator listening on a specific port, so that `cordova run` and `cordova emulate` can finally work.

The idea is about running `cordova emulate`
- you first scan listening ports to find existing b2g, connect in case they are found, or a specific port or version is specified (implemented for OS X and Linux)
- if no ports is found you then start a new simulator (coming soon)

The way I scan ports is straight forward, lsof or netstat in localhost and I find b2g processes.