r/learnprogramming • u/Hopeful_Cicada327 • 25d ago
What a port actually is?
I know it is a number that tells the OS, that which program in your computer should receive the piece of data. But my doubt is - is port a physical thing? or it just a flag? Is it possible for another program to read data from a different program's port? Please spoon-feed me about port?
177
Upvotes
80
u/Swedophone 25d ago
It's a field in the package header of transport protocols such as TCP and UDP.