We need to implement a timeout for some (Mac/iOS) code that reads from a socket 
via a CFReadStream, such that if a certain time elapses with no bytes received, 
we’ll close the socket and return an error to the caller.

The public API for CFStream doesn’t include this functionality, but on 
StackOverflow we found a suggestion to set a property 
“_kCFStreamPropertyReadTimeout”.

- What’s the status of this property? I know it’s undocumented, but there are 
some undocumented things in CFNetwork that are considered OK to use, and others 
that shouldn’t be used.
- Does it work on both Mac and iOS?
- Will using this property cause apps to fail App Store review?

(Of course, if there’s any preferred alternative API, that would be great. As 
it is, our fallback is likely to be to rig up our own timeout mechanism using 
an NSTimer, which is a drag since we have to keep resetting the timer’s 
fireDate.)

—Jens
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to