• 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: CFSocketDataCallBack buffer size
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFSocketDataCallBack buffer size


  • Subject: Re: CFSocketDataCallBack buffer size
  • From: Douglas Davidson <email@hidden>
  • Date: Mon, 23 Sep 2002 14:16:57 -0700

On Friday, September 20, 2002, at 02:13 PM, Aram Greenman wrote:

Is there any way to control the maximum number of bytes read between CFSocketDataCallBacks? What I want is to get a callback after each packet is read, instead of in 32K blocks. I think I am missing something really stupid. Also, if anyone has a better strategy for this type of problem I am glad to hear it.

With kCFSocketDataCallBack, CFSocket will usually try to read as much as it can get in a single read(), up to some internal limit. It does not wait until a certain amount of data is available. You may wish to try using kCFSocketReadCallBack instead, and do the read() yourself, if you do not like what you are getting from kCFSocketDataCallBack. However, if you are using a stream-oriented socket, in general you should not expect packet boundaries to be evident, no matter what API you are using.

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.

  • Follow-Ups:
    • Re: CFSocketDataCallBack buffer size
      • From: Aram Greenman <email@hidden>
References: 
 >CFSocketDataCallBack buffer size (From: Aram Greenman <email@hidden>)

  • Prev by Date: Re: Determining "default" address from Rendezvous resolve
  • Next by Date: disabling mulicast loopback + getting IP
  • Previous by thread: CFSocketDataCallBack buffer size
  • Next by thread: Re: CFSocketDataCallBack buffer size
  • Index(es):
    • Date
    • Thread