libmodbus TCP 及网络编程select函数(FD_ZERO,FD_SET,FD_CLR,FD_ISSET)
SELECT 函数用于在非阻塞中,当一个套接字或者一组套接字有信号时通知你,系统提供select函数来实现多路复用输入/输出模型。函数原型: #include <sys/time.h> #include <unistd.h> int select(int maxfd,fd_set *rdset,fd_set *wrset,fd_set *exset,struct timeval *timeout);阻塞:当某个事件或者任务在执行过程中,它发出一个请求操作,但是由于该请求操
原创
2021-02-22 14:55:42 ·
1761 阅读 ·
0 评论