Report the port number from p2p-http-server to p2p-server.

When p2p-server launches the p2p-http-server with the --port=0 flag
it doesn't know which port is the p2p-http-server listening on. This
prevents the tests to run in parallel since the port is fixed. Also,
when the p2p-http-server is lauched, it could take some time until
it is effectivelly accepting connections.

This patch makes the p2p-http-server notify the port number it is
listening on when it is already accepting connections.

TEST=Updated and added unittests.

Change-Id: Idb796de8856e26e9b65a926dd2164aaf08654e1a
Reviewed-by: David Zeuthen <>
Commit-Queue: Alex Deymo <>
Tested-by: Alex Deymo <>
9 files changed