If I connect two Android phones directly using Sockets

I want to make a connection between two Android phones directly in WIFI. These two Android phones are not on the same network. I went through this post.
Including socket programming in your applications: Android

I assume that we can connect two Android phones using a socket. But I do not know what are the possible limitations for direct sockets.
Will it work regardless of where the two devices are and what are their IP addresses?
Is Android suitable for an incoming connection if I make it a server?
Is it a good idea to connect two phones directly using Sockets?

+3
source share
2 answers

Will it work regardless of where the two devices are and what are their IP addresses?

It should, even if you are on a private network, as long as you have your port configured correctly forward on each internal route.

Does Android support an inbound connection if I make it a server?

He must

Can I connect two phones directly using Sockets?

I don't understand why not

Give it a try! You may see some problems with your ISP or carrier, allowing only some ports, try 80, 443 or 22 if higher port numbers give you problems.

+1
source

Android Sockets, WIFI WIFI, IP-, , IP- .
, Android- IP-, android. , , Android IP-

+1

All Articles