recvfrom超时设置 recvfrom阻塞接收的问题,网络不通就一直等,想改成非阻塞的,也不可靠谱。最后设置了一个超时时间 struct timeval tv_out; tv_out.tv_sec = 5;//等待10秒 … 继续阅读 recvfrom超时设置