¡@

Home 

2014/10/15 ¤U¤È 10:13:09

iphone Programming Glossary: readstream

How to verify a website certificate in Cocoa Touch?

http://stackoverflow.com/questions/1251117/how-to-verify-a-website-certificate-in-cocoa-touch

in the kCFStreamEventEndEncountered state you should be able to do the following assuming your stream handle is called readStream NSArray certificates NSArray CFReadStreamCopyProperty readStream kCFStreamPropertySSLPeerCertificates autorelease if certificates.. the following assuming your stream handle is called readStream NSArray certificates NSArray CFReadStreamCopyProperty readStream kCFStreamPropertySSLPeerCertificates autorelease if certificates count 0 SecCertificateRef certificate SecCertificateRef..

Buffering NSOutputStream used as NSInputStream?

http://stackoverflow.com/questions/3221030/buffering-nsoutputstream-used-as-nsinputstream

inputStreamPtr outputStream NSOutputStream outputStreamPtr bufferSize NSUInteger bufferSize CFReadStreamRef readStream CFWriteStreamRef writeStream assert inputStreamPtr NULL outputStreamPtr NULL readStream NULL writeStream NULL CFStreamCreateBoundPair.. bufferSize CFReadStreamRef readStream CFWriteStreamRef writeStream assert inputStreamPtr NULL outputStreamPtr NULL readStream NULL writeStream NULL CFStreamCreateBoundPair NULL inputStreamPtr nil readStream NULL outputStreamPtr nil writeStream NULL.. NULL outputStreamPtr NULL readStream NULL writeStream NULL CFStreamCreateBoundPair NULL inputStreamPtr nil readStream NULL outputStreamPtr nil writeStream NULL CFIndex bufferSize if inputStreamPtr NULL inputStreamPtr NSMakeCollectable readStream..

How to Maintain VOIP socket connection in background?

http://stackoverflow.com/questions/5987495/how-to-maintain-voip-socket-connection-in-background

is as follows NSString urlStr @ http 192.168.0.108 NSURL website NSURL URLWithString urlStr CFReadStreamRef readStream CFWriteStreamRef writeStream CFStreamCreatePairWithSocketToHost NULL CFStringRef website host 1234 readStream writeStream.. readStream CFWriteStreamRef writeStream CFStreamCreatePairWithSocketToHost NULL CFStringRef website host 1234 readStream writeStream CFReadStreamSetProperty readStream kCFStreamNetworkServiceType kCFStreamNetworkServiceTypeVoIP CFWriteStreamSetProperty.. CFStreamCreatePairWithSocketToHost NULL CFStringRef website host 1234 readStream writeStream CFReadStreamSetProperty readStream kCFStreamNetworkServiceType kCFStreamNetworkServiceTypeVoIP CFWriteStreamSetProperty writeStream kCFStreamNetworkServiceType..

Is there anything like 'getStreamsToHost' on real iPhone device?

http://stackoverflow.com/questions/806116/is-there-anything-like-getstreamstohost-on-real-iphone-device

free bridged to NSOutputStream you can use CFStreamCreatePairWithSocketToHost to get your stream pair CFReadStreamRef readStream NULL CFWriteStreamRef writeStream NULL CFStreamCreatePairWithSocketToHost kCFAllocatorDefault CFStringRef host port readStream.. NULL CFWriteStreamRef writeStream NULL CFStreamCreatePairWithSocketToHost kCFAllocatorDefault CFStringRef host port readStream writeStream if readStream writeStream CFReadStreamSetProperty readStream kCFStreamPropertyShouldCloseNativeSocket kCFBooleanTrue.. NULL CFStreamCreatePairWithSocketToHost kCFAllocatorDefault CFStringRef host port readStream writeStream if readStream writeStream CFReadStreamSetProperty readStream kCFStreamPropertyShouldCloseNativeSocket kCFBooleanTrue CFWriteStreamSetProperty..