CFReadStream is “toll-free bridged” with its Cocoa Foundation counterpart, NSInputStream. This means that the Core Foundation type is interchangeable in function or method calls with the bridged Foundation object. Therefore, in a method where you see an NSInputStream *
parameter, you can pass in a CFReadStreamRef, and in a function where you see a CFReadStreamRef parameter, you can pass in an NSInputStream
instance. Note, however, that you may have either a delegate or callbacks but not both.
CFReadStream and NSInputStream
最新推荐文章于 2016-09-26 18:15:12 发布