Allow port=0 to let the kernel choose a random unprivileged port. #9

Merged
merged 1 commit into from Jan 11, 2012

Projects

None yet

2 participants

@janpieper

If you pass 0 as port to net.Server.listen(<port>, <host>), the kernel will choose a random and free unprivileged port. You can select the selected port with net.Server.address().port.

@tj tj merged commit 3520521 into tj:master Jan 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment