Java – how to distinguish whether two IPS belong to the same computer?

We have client main programs and agents (both) on different computers The network configuration can be any type (we don't know) The agent connects to the main program. At present, we can only obtain IP and computer name as information How to distinguish whether two IPS belong to the same computer?

The computer may have multiple Ethernet cards

thank you.

Solution

The IP address cannot be distinguished by checking

Some computers have unique identifiers, but you need JNI to access them, and your code will be platform specific It may be a better idea to generate a guid and write it to a file in a temporary folder on your computer All software instances running on this computer will then read the same guid and provide this data to the server when the connection is established

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>