Search code examples
iosiphoneipadhttpserver

Two apps trying to start a HTTP server on the same port


I'm trying to make a file sharing app. One solution that I came up with is using an embedded mini HTTP server to allow others to connect to my app (and serve content to them). Now, I wonder, what if, the user already has an app that uses this technique, and already has the port 80 busy listening for incoming connections. When I'll try to start my server, it will fail, won't it? Can I avoid this situation?


Solution

  • 80 tcp port well known as HTTP, best way to avoid this problem is select some non popular port after 1024 to your app