This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

【cc3000】关于select的监听个数的问题?



在CC3000中调用select函数的时候,需要定义一个监听字符集 fd_set 类型的结构体;

根据宏定义可知:

#define __FD_SETSIZE            32

#define __NFDBITS               (8 * sizeof (__fd_mask))

typedef INT32 __fd_mask;

typedef struct
{
    __fd_mask  fds_bits[__FD_SETSIZE / __NFDBITS];

   #define __FDS_BITS(set)        ((set)->fds_bits)
} fd_set;

那么也就是 fd_set 结构体里面的 fds_bits[__FD_SETSIZE / __NFDBITS]  = fds_bits[ 32 / 8 * 4] = fds_bits[ 1]  ;

这是不是意味着在cc3000里面只能监听 1 个文件描述符??