0

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.

Tracer
  • 2,544
  • 2
  • 23
  • 58

4 Answers4

2

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.

masoud
  • 55,379
  • 16
  • 141
  • 208
  • This includes web browsers? – Tracer Mar 20 '13 at 20:20
  • @Tracer MM was referring to the server. You need to clarify whether you mean the server or the client in your question. – JBentley Mar 20 '13 at 20:21
  • No, browsers use port 80 as target port. They do not listen to 80 – masoud Mar 20 '13 at 20:21
  • That includes, for example, Skype, that happily comes configured to open that port on any machine. – jachguate Mar 20 '13 at 20:22
  • Client side is what I need to do. Server is on the separate empty machine so I don't worry about any conflicts there regarding port 80. My real concern was interference with the web browsers.. Thanks – Tracer Mar 20 '13 at 20:30
2

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.

Community
  • 1
  • 1
JBentley
  • 6,099
  • 5
  • 37
  • 72
1

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.

Geier
  • 894
  • 7
  • 16
1

If the network uses application-layer firewalls, they can block non-HTTP data over port 80. So if your application uses port 80 simply 'because it is not protected by most firewalls', be prepared for such more strict firewall settings, which do not allow your client/server communication.

mjn
  • 36,362
  • 28
  • 176
  • 378