When you write a code to listen from a port, like 80 for example, what happens under the hood? Is the method the OS uses to listen is pull, or push? In other words, does the OS checks that port every x milliseconds for example?
I just don't get it. The more I think about it, the more it seems to me that it can't be anything other than pulling.
I mean, even if OS set a callback function, still something should understand that new information has arrived to call that callback function. That something still should use pull to understand the arrival of the new data.
How a port listens?