Adding a Connection Detector class to check net connectivity