how can an application use port 80/HTTP without co

2019-01-10 04:54发布

If I understand right, applications sometimes use HTTP to send messages, since using other ports is liable to cause firewall problems. But how does that work without conflicting with other applications such as web-browsers? In fact how do multiple browsers running at once not conflict? Do they all monitor the port and get notified... can you share a port in this way?

I have a feeling this is a dumb question, but not something I ever thought of before, and in other cases I've seen problems when 2 apps are configured to use the same port.

7条回答
手持菜刀,她持情操
2楼-- · 2019-01-10 05:28

Outgoing HTTP requests don't happen on port 80. When an application requests a socket, it usually receives one at random. This is the Source port.

Port 80 is for serving HTTP content (by the server, not the client). This is the Destination port.

Each browser uses a different Source to generate requests. That way, the packets make it back to the correct application.

查看更多
登录 后发表回答