• 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: Altering CFSocket Callback Behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Altering CFSocket Callback Behavior


  • Subject: Re: Altering CFSocket Callback Behavior
  • From: Douglas Davidson <email@hidden>
  • Date: Mon, 17 Feb 2003 09:41:42 -0800

On Saturday, February 15, 2003, at 12:02 PM, Brian Victor wrote:

I have been successful in using CFSocket for a minimal select()-style
wrapper around the unix socket interface. But it seems that the read
callback is called when there is any data in the buffer, rather then
when new data comes in.

This is how select() works. Why are you surprised?

If you want the callbacks to cease, you can (a) read the data, or (b) turn them off temporarily until you are ready to handle more data, using the CFSocket enable/disable functions. We don't have an edge-triggered mode, although you can use kCFSocketDataCallBack to give you something like it, if you don't need to do the actual reading yourself.

Douglas Davidson
_______________________________________________
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: 
 >Altering CFSocket Callback Behavior (From: Brian Victor <email@hidden>)

  • Prev by Date: Carbonization of MoreNetworkSetup
  • Next by Date: Re: Carbonization of MoreNetworkSetup
  • Previous by thread: Altering CFSocket Callback Behavior
  • Next by thread: WAN address
  • Index(es):
    • Date
    • Thread