Learn Socket program step by step