Hi all,
This is a very weird problem. I have the following
code on Mac:
// forRead, forWrite and forOOB are function parameters
FD_ZERO(&rset);
FD_ZERO(&wset);
FD_ZERO(&eset);
if (*forRead) FD_SET(sockfd, &rset);
if (*forWrite) FD_SET(sockfd,&wset);
if (*forOOB) FD_SET(sockfd,&eset);
numActive = select(sockfd+1, &rset, &wset, &eset, &waittime);
if (numActive
< 1)
{
*forRead = *forWrite = *forOOB = 0;
}
else
{
*forRead = (FD_ISSET(sockfd,&rset))? 1 : 0;
*forWrite = (FD_ISSET(sockfd,&wset))? 1 : 0;
*forOOB = (FD_ISSET(sockfd,&eset))? 1 : 0;
}
Now, even after I break the socket connection
from the server side, forOOB is not set. It works perfectly fine on Windows!!
Does anyone have an idea of what’s going wrong
here?
Thanks
Anand