When listening to Computer Networks class today I got the following interesting doubts which I got clarified by my professor
Q) what is doubt:- when every browser is allocated a port number 80 then how can multiple tabs of chrome or any browser can talk through that when only when process can be listened through one port ?
Ans:– servers listen through port-80 for browsers but not on client side..on client side your OS uses port numbers >5000 so every new tab(as for google it is a process..read the below) uses a unique port number —i.e one process one port
this is a informative link read it for sure
Q)- also do chrome use multi threading or multi process for new tabs
Ans:-chrome uses multiprocess and mozilla multi threading
read this for sure
Q)Ok on server side server listens through port:-80 for all browsers….but then there several process or browsers in world should use the same 80 port number of server…but one port listens only one process at a time …then how ?
Ans:-Basically, only one process can LISTEN on a port at a time (technically, one socket is dedicated to listening). But, a port can handle many sockets transferring data, a socket is a combination of local IP / port and remote IP address / remote port. In that way, once the server accepts the incoming connection while LISTENing it opens a new socket dedicated to that conversation and hands the processing off to something else, then goes back to LISTENing.
read for more info