modified: add struct timeval* for recv_n