I have a virtual router on my laptop that my raspberry pi is connected to. It runs a couple of java processes that I need to keep track off, so if it disconnects I want to make it stop working, so:
while(true){
if(WifiChecker())
return;
//do rest
}
Is there a way to accomplish this? If possible I would also like something easy that makes it reconnect to my virtual wifi, though that is not necessary.