I’m building a Nerves application that requires a handshake on boot (or close to) over the network, what’s the best way to wait for a Network connection before attempting to make a network request?
I can see from the VintageNet docs you can look up the status of a specific interface, but the application will be deployed onto devices with
wlan0 connections - is there a way to generalise this lookup?
Also, any direction on how to implement this would be appreciated, I’m still pretty new to using Elixir and getting my head round recursion. For example, is it best to block to block while a network connection is found or to run a separate process that waits in the background and then alerts other processes to a working connection? I suspect for my use case it would be best to block until we have a connection, but I’m wary this might not be the “Elixir” way of doing things.