Hello, I am a noob in the field of networks, tell me how can I make it so that two applications (a server on a spring booth) can connect to each other if I have
access to both devices, but the connection must be via the Internet, I know that most cryptocurrencies work similarly to p2p, I have a discovery, an application -
a server that will store ip addresses, but I don’t know how to write code in java so that both servers can connect to each other, I heard a little about turn, I have an application
works on REST api, I know a little about sockets. Can you show step by step how to implement it.
if I run these applications twice on different ports, on the same device, everything works, but how do I make a connection, on
different devices over the Internet? what ip should i take and from where? I heard about the white ip, but whoever runs it on their PC, give me a simple code.
example of my code: