只有在recv阻塞socket的时候,才有意义。你已经是non-blocking socket了,还设timeout干啥。 如果你是想要设置 select 的 timeout,应该在调用 select 时候