简体   繁体   中英

Can I use port 80 in my VCL client-server app's

Usually I use some random port for my client-server applications in Delphi/C++ Builder. But, since I work in a building with a strong firewall policies I would like to use port 80 (TCP and/or UDP).

My question is, will I have any problems in my client-server communication if there are other applications using the same port? I suppose my server will pick up that communication as well? I would like to avoid any possible conflicts with other app's.

Yes you will have problems, if there is an application which is listening to port 80, then you can not use that port.

Notice, Browsers use port 80 as target ports, they don't listen to 80. So, don't count them when you want use that port.

If I understand your question correctly, you appear to be concerned about the ports on the client-side, not the server side. Your application is free to connect to a server which is listening on port 80 and it will not interfere with any other client applications running on the same machine. If it did interfere, things like multiple browsers / tabs would not be possible.

There are some excellent answers on this question which explain in more detail how ports work.

There can only be problems if there are other servers listening on port 80 on the server machine. In this case your application would not be able to bind to port 80. The app will not interfere with web browsers, because they use a random port on the client side.

如果网络使用应用程序层防火墙 ,则它们可以通过端口80阻止非HTTP数据。因此,如果您的应用程序仅使用端口80,“因为它不受大多数​​防火墙的保护”,请准备好使用更严格的防火墙设置,这样做不允许您的客户端/服务器通信。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM