[CISYSTEM] [JAVA] [FIND LOCAL IP ADDRESS]
My plan is to have both options for connecting the nodes in CISystem :
Yes, scanning ports is not nice, but the idea of CISystem is to create a network where the nodes can be replaced on-the-fly and that means you need to scan for nodes anyway.
A node shall only need to know one other node to find the network, all other information will be communicated via the network to all other nodes.
Due to DHCP it would be quite an effort to fix the network configurations every time the router changes the addresses.
This all means, a node should find its own local IP address and tell it to the other nodes of the network.
I have implemented an example to show how this works in Java :
This is the complete example code including Gradle build script : zipped example of Find Your Local IP Address
The Blog
|
|
|
|
My Technical Blogs
|
|
|
|
|
|
|
|
|
|
|
|
Projects
|
|
|
|
Blogs Of Friends
|
|
|
|
|
|
CV/About
|
|
|