Sorry, I had some other things to take care of.
As noted earlier, the strategy for this would be:
- local computer - UDP broadcast with IP address during Main.OnInit
remote computers - TCP acknowledge with network name and IP address
The Broadcaster plugin also took me a while to figure out correctly.
I think that this also had to do with the fact that I am using a simple crossover cable for the network.
For a long time I could not get the UDP broadcast to show up on the other computer.
Even playing around with the firewall settings and IP addresses of both machines were hopeless.
Eventually I got it working.
Usually I use the default settings for everything.
When I added the Broadcaster plugin, the UDP port was set to 33333.
When I added the Broadcast Action, the port was set to default.
I do not know if this problem is specific to crossover cable networks, but that will not work.
You have to change the port in the Broadcast Action settings to the same port in the Broadcaster plugin settings.
Fortunately, that can be achieved automatically in Python.
So instead of adding the Broadcast Action to the configuration tree, use Python to call the Broadcast method with the correct port setting.
Another advantage of using Python is that we can check if the computer is connected to the LAN.
If you are not connected to the LAN, then a UDP broadcast will cause an error.
This crossover LAN cable approach is proving to be quite useful.
It has provided two useful techniques that allow for robust configuration trees.
Earlier I asked for info about IP addresses on more elaborate LANs.
It would also be interesting to know if the default port of the Broacaster plugin behaves the same way in elaborate LANs.
There is something else that I have noticed with the Broadcaster plugin, it is not really a bug, but an inconsistency.
It does not show the payload in the Log window.
It is not such a big deal, just something that is unusual.
Now I just need to add the TCP acknowledge part of this problem.
I think I will post the PC1 and PC2 configurations that incorporate the problem 2 and problem 3 solutions when I have finished them.
Then we can tackle problem 4, which will give us a configuration that can be used on any computer, in networks with more than 2 computers.