An excercise in socket programming