int sockfd; 
fd_set fds;
struct timeval timeout;
timeout.tv_sec=3; 
timeout.tv_usec=0;
for(;;) 
{
  FD_ZERO(&fds); 
  FD_SET(sockfd,&fds); 
  switch(select(sockfd+1,NULL,&fds,NULL,&timeout))//检查可写状态 
  { 
     case -1:perror("error");
     case 0://超时发生,
     default:if(FD_ISSET(sockfd,&fds)) 
   {
            //发送数据
   } 
  } 
}
为什么select每次执行只返回-1?