How to know if 3 machines in LAN are connected
I need to design a system in which 3 machines need to be connected with process id P0, P1 and P2 such that if we start P0 first it should wait until P1 and P2 are connected to it and also P1 and P2 are interconnected. I am using socket programming but unable to find logic as to how to implement this. Same ways P1 and P2 need to wait until other machines are up. There is no fixed order as to which machine will be run first.
Any help will be highly appreciated.
Thanks and Regards