Switch and Socket Programming