在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 中的。

是有区别的!

相关文章:

  • 2021-11-17
  • 2022-12-23
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-09
  • 2022-01-08
  • 2021-07-28
  • 2022-01-10
  • 2022-12-23
  • 2021-12-15
相关资源
相似解决方案