Re: CFSocketDataCallBack buffer size
Re: CFSocketDataCallBack buffer size
- Subject: Re: CFSocketDataCallBack buffer size
- From: Aram Greenman <email@hidden>
- Date: Mon, 23 Sep 2002 19:13:54 -0700
On Monday, September 23, 2002, at 02:16 PM, Douglas Davidson wrote:
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.
I meant application layer 'packets', I guess I should have said
'messages'.
Anyway I am now using kCFSocketReadCallBack and storing the data in a
buffer until a complete message is read and issuing my own callback at
that time, which is working fine.
Thanks,
Aram
_______________________________________________
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.