Quantcast
Viewing all articles
Browse latest Browse all 116964

Forum Post: RE: CC3000 select() does not report socket closure

Hi,

I also have same problem.I didn't success to indicate when the socket close. 

my code is:

 FD_ZERO (&exp);
 FD_SET (getSocket(), &exp);

selres = select(2, readerSet, NULL, &exp, getTimeout());

if(selres)

{

                              if (FD_ISSET(getSocket(), &exp))
                                {
                                  return SOCKET_DISCONNECTED;
                                }

}

else
{
                return NO_RECEIVE;
}

when the server close the socket, the  selres get 0 and not 1.

maybe someone can help us.

Thanks,

Idan


Viewing all articles
Browse latest Browse all 116964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>