Some socket examples from ch. 17