• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Select not working on Mac
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Select not working on Mac


  • Subject: Select not working on Mac
  • From: "Anand Thakur" <email@hidden>
  • Date: Mon, 13 Nov 2006 18:13:42 +0530
  • Importance: high
  • Priority: Urgent
  • Thread-topic: Select not working on Mac

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

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Select not working on Mac
      • From: Quinn <email@hidden>
References: 
 >Get 0 bytes when receive raw ethernet packet (From: Robin <email@hidden>)

  • Prev by Date: Re: connecting through proxy
  • Next by Date: Re: Select not working on Mac
  • Previous by thread: Get 0 bytes when receive raw ethernet packet
  • Next by thread: Re: Select not working on Mac
  • Index(es):
    • Date
    • Thread