move functionality to class
keep track of current address and handle conn. failure
use ping to find net latency (for #1)