E
E
eegmak2021-06-21 11:17:20
Android
eegmak, 2021-06-21 11:17:20

How to connect two applications without a common server?

Is there a way to connect two android devices with our application to the network without a shared server?
In other words: is it possible to connect android applications to each other without a server part?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
res2001, 2021-06-21
@res2001

If we are talking about interaction within the same WiFi network, then there is no problem. Use broadcast packets to notify other devices that there is a device on the network that is ready to use your protocol.
If this is a more general task, not tied to the same network and WiFi, then even if the devices know each other's addresses (no matter how), there may be problems accessing the device due to the telecom operator, because. in cellular networks, the operator's NAT is usually used, which prevents direct access from the Internet to the device (NAT is usually enabled in any WiFi router, etc.). In this case, you will have to use some server on the Internet with a static address.
There are options for bypassing NAT, but they also require a server to initialize the connection, and then the devices can work directly. Similar techniques are used, for example, in VoIP. Google for the STUN protocol.

P
pfg21, 2021-06-21
@pfg21

can.
see p2p networks , they have a wagon and a small cart, they have been invented for all tastes and options.
it is desirable that at least one device in the link should be with white ip (ipv6), otherwise collective farm options for bypassing nat.

M
Maksim Herasim, 2021-06-21
@Tkreks

Look at the implementation of torrent or i2p protocols, there is essentially no server part there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question