Network Programming hw2 : use select