Network Status

Hi,
Is there a way to check from your application if the
network is alive ?

Thanks,
Shashank