Rapsssito / react-native-tcp-socket

React Native TCP socket API for Android, iOS & macOS with SSL/TLS support.
MIT License
304 stars 80 forks source link

Question: best way to find an open port? #116

Closed happymaskterriblefate closed 2 years ago

happymaskterriblefate commented 3 years ago

Hi there -- thank you for your great TCP library! I was wondering if you have advice on how to find an open port for listening on the device?

I may be a bit paranoid, but I'm worried that I'm going to ship my app and then my port choice will collide with another app on a user's device. My entire app will cease to function if the local tcp doesn't start up. Is this something that I should be worried about? Is there a recommended approach to finding an open port on the device?

Thank you in advance.

Rapsssito commented 3 years ago

@happymaskterriblefate, you should always use ports above 1024. However, before using those ports above 1024 it is highly recommended to inform yourself about that port, I simple Google search should be enough.

github-actions[bot] commented 2 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community attention? This issue may be closed if no further activity occurs.