1
I observe this behviour from very famous projects. For example apache and nginx, they both by default trying to listen port 80 and if it's already occupied then they just fail to start and need to be reconfigured.
What if for my small server project I pick some port not mentioned on List of port numbers yet? My goal is to make the server application working at most of households with wi-fi routers. They usually don't have any unusual ports occupied (or they do?). So if I occupy the one I shouldn't have problems most of the time. Am I wrong? What problems I might get with this approach?
See this: http://superuser.com/questions/381058/what-is-the-purpose-of-ports?rq=1
– Ƭᴇcʜιᴇ007 – 2013-08-07T19:45:09.927@vladimir why don't you design your application to have a fallback solution? (ie try other ports if one is taken). – tay10r – 2013-08-07T21:55:16.177
Yeah. That's what I'm choosing between - fixed port or selecting available port. For the port I need to drill a hole in router through UPnP. So I'm not sure how that gonna work if the port will change every server restart. It's obviously more work for me but might work better. – vladimir – 2013-08-08T01:15:05.137