• 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
Re: select not setting the read flag (SOLVED)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: select not setting the read flag (SOLVED)


  • Subject: Re: select not setting the read flag (SOLVED)
  • From: Nicolas Berloquin <email@hidden>
  • Date: Sat, 29 May 2004 23:49:57 +0200

Hi !

thanks to Ian Lister, I solved my select problem.
Unfortunately for the list, it was a problem with some race conditions where
new incoming socket connexions were not added to my select desciptor list,
(because of the lock/unlock mechanism I has setup), therefore I cannot add
any real insight for others.

But one thing really helped me, and I believe this can help others:

> "Logging FD_ISSET(fd, &readfds) before and after calling select, as well as
> fd and whatever value you are passing as nfds would be the most useful
> things you can do."

was the key for me.
I did a log after each select call that returned a positive value with
an output that looked something like that :

iooOooOIIOooIIo O o O
000001000000010000100000000001 read flag
000000000000100000000000000000 write flag


(values randomly entered for this email).
o = outgoing socket before the threeway handshake
O= connected socket
i= listen socket
I= accepted incoming socket.

this allowed me, with the help of 'watch netstat -anp tcp' to see that sometimes,
the count of ESTABLISHED incoming connected shown by netstat was not the
same as the number of 'I' in my output.

I hope this will eventually help a lost soul sometime in the future ^_^

thanks again for your help !
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: select not setting the read flag (followup) (From: Ian Lister <email@hidden>)

  • Prev by Date: Re: Retreiving SOCKS user+password
  • Next by Date: Using MoreSCF to write a custom VPN dialer
  • Previous by thread: Re: select not setting the read flag (followup)
  • Next by thread: GestaltUSBVersion
  • Index(es):
    • Date
    • Thread