Socket Programming by Example