• 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
_kCFStreamPropertyReadTimeout
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

_kCFStreamPropertyReadTimeout


  • Subject: _kCFStreamPropertyReadTimeout
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 20 Jan 2017 11:09:53 -0800

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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: _kCFStreamPropertyReadTimeout
      • From: "Quinn \"The Eskimo!\"" <email@hidden>
    • Re: _kCFStreamPropertyReadTimeout
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Hostnames
  • Next by Date: Re: _kCFStreamPropertyReadTimeout
  • Previous by thread: Re: Hostnames
  • Next by thread: Re: _kCFStreamPropertyReadTimeout
  • Index(es):
    • Date
    • Thread