to the internet, rather than to a network generally?
if so, then why not just open a socket to the site you are interested in?
(that way you connection to the network, and also such things as DNS and gateway setup)
if you just want to know that the network is available (rather than internet), then you need to just check the network interface status (of both ethernet and wlan)
|