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
Must you read all you can on kCFStreamEventHasBytesAvailable?
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Must you read all you can on kCFStreamEventHasBytesAvailable?
Subject
:
Must you read all you can on kCFStreamEventHasBytesAvailable?
From: "James W. Walker" <
email@hidden
>
Date: Thu, 13 Apr 2006 18:26:39 -0700
If you're using a CFReadStream in the non-blocking mode, and your callback receives kCFStreamEventHasBytesAvailable, what happens if you don't consume all the bytes that are available? In the best of all possible worlds, you'd get another kCFStreamEventHasBytesAvailable message. The sample code in the CFNetwork Programming Guide seems to suggest that is so, because it just reads what fits in one buffer on kCFStreamEventHasBytesAvailable. In contrast, CFFTPSample takes pains to keep reading until either CFReadStreamHasBytesAvailable returns false or CFReadStreamRead reads 0 bytes.
--
James W. Walker, ScriptPerfection Enterprises, Inc.
<
http://www.write-brain.com/
>
_______________________________________________
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: Must you read all you can on kCFStreamEventHasBytesAvailable?
From:
Becky Willrich <email@hidden>
Prev by Date:
Socket stream not providing data
Next by Date:
Parsing proxy exceptions list?
Previous by thread:
Socket stream not providing data
Next by thread:
Re: Must you read all you can on kCFStreamEventHasBytesAvailable?
Index(es):
Date
Thread