Re: Using CFNetwork on 10.1
Re: Using CFNetwork on 10.1
- Subject: Re: Using CFNetwork on 10.1
- From: Becky Willrich <email@hidden>
- Date: Mon, 20 May 2002 10:57:40 -0700
This weekend I adapted some code to use CFNetwork/CFStream for some simple HTTP posts. It's working pretty well, but there's one issue that I'd like to ask about. Under MacOS X 10.1.4, my callback never gets a notification for kCFStreamEventEndEncountered. I do get an extra kCFStreamEventHasBytesAvailable with a zero count that tells me that I've read all the data, so I can use that instead. However, under Jaguar I get the kCFStreamEventEndEncountered just fine.
Yes, this is a known issue on 10.1.4.
Is this a known issue? Is it reasonable to simply treat the zero length kCFStreamEventHasBytesAvailable as a defacto end?
Any time CFReadStreamRead() returns 0, the stream is at end, so your workaround is perfectly reasonable. CFStream/CFNetwork should send a follow-up kCFStreamEventEndEncountered, but under 10.1.4, that doesn't always happen.
Hope that helps,
REW
_______________________________________________
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.