Explain, please, someone how the WiFi multiplayer is arranged in the applications.

The Internet is full of tutorials on this topic. For example, with multicast DNS it is very easy to connect 2 devices on the same LAN. But it turns out that both the client and the server should already be connected to some network (that is, some other device is needed that would distribute this network). If the server turns on modem mode, it will no longer be able to connect to its own network and, therefore, nothing will work.

Please help me figure it out.

  • Two Android devices, when connecting via wifi, only the local network is organized (the Internet is not provided, the Internet is as an option). Will you need to scan certain ips in the local network for a port, is the port found? Is there an answer? this is the server, connect to it. - Denis Kotlyarov
  • JmDNS automatically scans all ip on the network. If one device will distribute wifi, then it is no longer detected, and if it connects to the wifi network of my router, for example, both devices find each other - Ziens
  • If the device "distributes wifi" - it continues to have access to the communication channel, and can transfer data to it. Look towards WiFi Direct and an example of its use in SuperBeam. - DimXenon
  • And here's the topic of WiFi data transfer: stackoverflow.com/questions/20345155/… - DimXenon
  • Wi-Fi peer-to-peer (P2P) is available in Android 4.0 (API level 14) or older. developer.android.com/guide/topics/connectivity/wifip2p.html - DimXenon

1 answer 1

I think this is someone else useful. I managed to connect to an access point without jmDNS using the address

192.168.43.1:8988 

Via ServerSocket/Socket