icydee

icydee t1_j1yvee6 wrote

Think of it like a big apartment block with a single letter delivery address. Each room in the apartment is identified by a number 0 to 65535 and any incoming letter is sent to that room.

Any incoming letters with address 80 go to apartment 80. Now apartment 80 may be unoccupied in which case the letter is ignored. However it is agreed that by convention apartment 80 is the home of the HTTP application, that knows how to read and process that letter, and send back a reply letter to the sender.

Other applications have their preferred room number, to make it easier to communicate with, simple email prefers room 25, file transfer is greedy and needs two rooms, 20 and 21. Etc.

These common applications prefer the ground floor rooms, 0 to 1023 so it usually means that they have to have special permission from the building supervisor to move in.

Of course there is nothing stopping applications taking other room numbers, you will sometimes find HTTP also in room 8080 but any number is possible from 1024 to 49151 and applications are free to move in to any room so long as it’s not already occupied. Terraria likes the view from room 7777 and tries to move in there (and because it’s users have difficulty remembering their room number otherwise!)

All the rooms on the top floors, 49152 to 65535 are available to be used by applications dynamically, think of them as Airbnb rooms, use them for a short while then move out and let someone else use them.

8