I am looking for a way to add a timeout to a CFHTTP request. It seems like there should be a feature of the CFHTTPMessage
or the CFReadStream
object, but I can't find it. Do I have to roll my own timer on the run loop or something? (if so, any code for this?)
Thanks!
Try this, readStream is your CFReadStreamRef:
Constant for write timeout is _kCFStreamPropertyWriteTimeout
My answer is outdated but I can't delete the accepted answer.