logoalt Hacker News

Port 0: The Port That Does Not Exist

38 points • by NewCzech • today at 9:38 AM • 14 comments • view on HN

Comments

greggsy • today at 11:37 AM

I saw the URL and immediately thought it was about Acid Pro DAW or Vegas video editor is used to use back in the early 00’s.

99harry • today at 1:43 PM

Sometimes I have scripts that automatically assign ports starting from 30000. How would that work? Would I have to bind to port 0 multiple times until I randomly get a port in that range?

➕ show 1 reply
justsomehnguy • today at 3:35 PM

I have a feeling what sometimes :0 is interpreted as a 'first listening'. But Occam says what most of the time it's just 'DNAT dst port ANY to :80' or whatever, no magik.

embedding-shape • today at 11:54 AM

I'm not sure how I'd do acceptance/E2E testing without the magic of port 0. As long as you have a way of capturing what port it ended up using (which most languages are able to out of the box more or less), parallelizing testing workloads becomes such a breeze without having to manage ports and all that jazz, just fire everything up with N parallism and let the OS figure out what the free ports are, pass the references down and stuff just works. Thanks Linux :)

➕ show 2 replies
skinfaxi • today at 10:36 AM

Seems hugged?

alexkampler • today at 2:10 PM

[flagged]

wrayjustin • today at 1:25 PM

[dead]

routernat_tools • today at 11:07 AM

[flagged]