How many port numbers do Android and ios have?

I tried Google, but I canโ€™t even see a message about it. When I want to create a socket in android, the same rule, how do we create a socket on a PC, apply to Android? Does the program listen on one port and wait to create a socket?

+8
android ios iphone
source share
1 answer

You have ServerSocket and Socket . Call Socket client = ss.accept() to wait until the client hooks. Ff you are not sure which port is free, just use ss = new ServerSocket() . This will automatically assign a free port. Also make sure that you do not do this in the main topic and declare the appropriate permissions in the manifest.

+1
source share

All Articles