connection doctor class for detection online/offline