欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

fd_set struct

发布时间:2025/3/19 编程问答 36 豆豆
生活随笔 收集整理的这篇文章主要介绍了 fd_set struct 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

在linux的源码中对于fd_set结构体是这样定义:

#undef __NFDBITS #define __NFDBITS (8 * sizeof(unsigned long))#undef __FD_SETSIZE #define __FD_SETSIZE 1024#undef __FDSET_LONGS #define __FDSET_LONGS (__FD_SETSIZE/__NFDBITS ) typedef struct {unsigned long fds_bits [__FDSET_LONGS];} fd_set;

并没有fd_count 和 fd_array,而fd_count和fd_array是在windows的 WinSock2.h 中的。

是有区别的!

转载于:https://www.cnblogs.com/lxgeek/archive/2011/02/23/1962070.html

总结

以上是生活随笔为你收集整理的fd_set struct的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。