fd_set readfd;
FD_ZERO(&readfd);
//s 设置为非阻塞模式了
while(TRUE) {
as = accept(s, (PSOCKADDR)&addr, &addrlen);
                  FD_SET(as, &readfd);
if (as == SOCKET_ERROR) continue;
int hh = select(0, &readfd, NULL, NULL, NULL);
//if (hh > 0 ) return 0;
if (FD_ISSET(as, &readfd)) {
printf("%d\n", hh);
}
}
这样写了以后 客户机链接上来 但是as总是 SOCKET_ERROR但是改成
while(TRUE) {
as = accept(s, (PSOCKADDR)&addr, &addrlen);
if (as == SOCKET_ERROR) continue;
                  FD_SET(as, &readfd);
int hh = select(0, &readfd, NULL, NULL, NULL);
//if (hh > 0 ) return 0;
if (FD_ISSET(as, &readfd)) {
printf("%d\n", hh);
}
}
就没有问题了 FD_SET是不是影响了as 请问这到底是为什么