Implementation of the Chat server using select()