adamfisk/LittleProxy — pull request #163 by jekh (2014-12-10 18:07:32+00:00)
Title: Allow port zero

Java allows specifying port 0 in order to have the JVM choose an open port for you [(InetSocketAddress javadoc)](https://docs.oracle.com/javase/7/docs/api/java/net/InetSocketAddress.html#InetSocketAddress%28java.net.InetAddress,%20int%29). Currently LittleProxy doesn't expose any mechanism (that I'm aware of) to retrieve the actual port the server is bound to after the proxy has been created.

This PR tracks the "requestedPort" and "boundPort" separately, and exposes the second through the existing getListenAddress() method.