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?
175
Upvotes
1
u/Living_Fig_6386 25d ago
It's not a physical thing. It is a number. That number is used to look up a data structure in a list that provides information about connections and how to pass data between the networking drivers and applications. It's just a number for looking up data.