Make two Java applications in the same LAN aware of each other

I have a Java program running on two computers that are on the same network. I would like these applications to recognize each other, so they could communicate directly, and not communicate with the server to send messages.

I believe that I may have a solution to how this will work, but I can not find examples to compare my solution. Do you guys know how this problem is usually solved?

+3
source share
3 answers

There is a good library that implements the Zeroconf / Bonjour standard in plain java at http://jmdns.sourceforge.net/

(, iTunes Mac).

http://www.amazon.com/Zero-Configuration-Networking-Definitive-Guide/dp/0596101007 .

+5

, , , , , , . ( IP- .)

, , TCP- ( UDP, ), .

Btw, IPv4 - IPv6 ( - ).

+2

Source: https://habr.com/ru/post/1782534/


All Articles