Take a look at the link here:
It describes a ping utility for you. However, the Icmp socket type is not available (at least through C# Compact .NET framework on my PDA) so I ended up modifying it to use:
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
I did lots of modifications as I was using this for a very specific purpose but it was a good starting point.
Setting up a ping to a server will keep the connection alive if it is already up. I would suggest "playing" with the timing to keep bandwidth down and keep the connection up.
I know this post is old so this probably is not useful but others may run into it.
Hope this helps,
Reliable, affordable solutions for a mobile world