How does Port Number really work in TCP?

前端 未结 3 1094
别那么骄傲
别那么骄傲 2020-12-12 13:59

https://serverfault.com/questions/296603/understanding-ports-how-do-multiple-browser-tabs-communicate-at-the-same-time

how can an application use port 80/HTTP withou

3条回答
  •  不知归路
    2020-12-12 14:35

    I have read the above question on respective forum but I guess people there also do not agree with each other.

    I see no disagreement in any of those concerning the matters you mention.

    I want to know what exactly defines a socket Connection

    ( sockid , source ip , source port , dext ip , dest port )

    or only

    ( source ip , source port , dext ip , dest port )

    The latter. The former is a figment of imagination. It isn't mentioned in any of the threads you cite.

    What I want to ask is that can two different processes like two different Browsers communicate with a web server on same source port.(Dest port would be same by default).

    Not if they are at the same source IP. It would violate the identity definition stated above.

    What in case of Different tabs in same browser.

    Yes, because of connection pooling. If you are talking about separate connections, the answer is still no.

    Also as mentioned in one of the answers a single web page tries to connect to many different servers like ad servers etc. So does Chrome or firefox for that matter connect with the same port to different servers or use a single port.

    You are going to have to explain this. What is the difference between 'the same port' and 'a single port'? Not a real question.

提交回复
热议问题