http://c.biancheng.net/view/2131.html
https://zhuanlan.zhihu.com/p/598315939?utm_id=0

fcntl(sockfd, F_SETFL, fcntl(sockfd, F_GETFL, 0) | O_NONBLOCK);  

ioctl(sockfd, FIONBIO, 1);  //1:非阻塞 0:阻塞 

0 条评论

发表回复

您的电子邮箱地址不会被公开。