Occasionally connected clients

One thing that NO application developers seem to get right is support for regularly disconnected connections. If you try to use a cell phone and travel at the same time, you get a regular drop in connectivity and occasional disconnect. For example I currently have just reconnected to the network and received full connection.clip_image001[4]

However thirty seconds and (according to Live Search on my mobile) as we enter the next cell, then my initial connection suddenly loses its ability to perform any IP traffic whatsoever.image

One swift(!) disconnect and reconnect I’m ready to try again.  image

One of the best applications for coping with this is, not surprisingly, Outlook.  In the background it will note the fact that the IP connection is there and suddenly take advantage of this, swinging into life and attempting to grab those connections back to email servers.image

DotNet network information

In fact it is remarkably easy to add to your own applications as since DotNet 2.0 there is a whole network connectivity interface that lets you determine just how connected you are, see System.Net.NetworkInformation. When I first looked at this a few years ago I found that hooking into the NetworkChange event handlers,  and if you listen just to the the NetworkAvailabilityChanged event, then it arrives just a little too early. It’s fine for disconnections, but you often get told that the Network is connected before you have an IP address.

In particular I recommend checking the IP address that’s now available on the NetworkAddressChanged event. this can be used to dig right down. You can check the type of connection and even the subnet you've attached to.

With power comes responsibility

The question to consider at this point is how nicely should we play, when network connectivity becomes sparse how should we share it? For years I used a mobile cell tariff that didn’t include data, and positively prohibited it at its rate per Mb. My problem was literally killing off all those inconsiderate applications that were about to downloading as soon as they had the chance.

A lot of programs that are better now as they at least only check for new updates once a week, but the question is how considerate should our applications be. Most users would want to I am writing the latest anti-theft program that will send those few bytes out telling people who has stolen their mobile device laptop then we need to wait before connecting to the internet. Unless Windows 7 comes along and provides means of categorising your data usage then we shouldn’t we provide a dialog that lets the user choose what to do with the connection when you first connect to it, maybe something like this

image

Add comment

  Country flag


  • Comment
  • Preview
Loading