Re: Network Status Notification
- From: "Pavel A." <pavel_a@xxxxxxxxxxxxxxx>
- Date: Sun, 1 Apr 2007 02:07:52 +0300
"one-trick-pony" <worldofpain.aamir@xxxxxxxxx> wrote in message news:1175262001.717782.57030@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I was reading about SENS yesterday at MSDN. But somethings I didn't
liked about that approach is most of the functions that I saw required
TCP/IP implemented to work, it seems to be geared toward mobile users,
MS does not recommend using IsNetworkAlive function because it can
hang your system for long time and is slow. Furthermore,
documentation on how to set up for Notification of network status
seems to be missing.
I will appreciate any good software engineering suggestions.
Aamir
IMHO your solution (polling in a separate thread) is simple and good enough.
Of course, the polling should be not very heavy on the system
(for example, don't ping continuously, poll less frequently while disconnected).
As the next step, you can add detection of WMI events and so on.
This really depends on what kind of "network connectivity"
you need to detect - is it LAN or internet connection?
Why the status of network can change:
- a cable unplugged
- the remote side goes down
- Wireless connection comes and goes
Regards,
--PA
.
- Follow-Ups:
- Re: Network Status Notification
- From: one-trick-pony
- Re: Network Status Notification
- Prev by Date: Re: Network Status Notification
- Next by Date: Re: I want to know if SpeedStepping is enabled
- Previous by thread: Re: Network Status Notification
- Next by thread: Re: Network Status Notification
- Index(es):
Relevant Pages
|