Questions tagged [cfreadstream]

28 questions
21
votes
5 answers

iOS Voip Socket will not run in background

I am getting a VOIP socket to run in the background in an iOS application. My connection works fine, but it won't wake up when my app goes into the background. If I open the app back up, though, it responds to any messages it got while it was…
Joel
  • 1,110
  • 1
  • 9
  • 15
10
votes
1 answer

CFReadStreamRead blocking forever under iOS 7

I'm seeing an issue wherein CFReadStreamRead, as part of a streamed file upload, never returns. This seems to happen only on iOS7 — and far more often when debugging against a physical device than in the simulator — or at least, it's far more…
Paul Roub
  • 36,322
  • 27
  • 84
  • 93
4
votes
0 answers

Keep alive UDP socket in background for ios

My question is not actually what is the code to keep UDP socket alive when application in background but a confusion about the documentation in apple developer site. According to apple developer guide if i set kCFStreamNetworkServiceType to…
shantanu
  • 2,408
  • 2
  • 26
  • 56
4
votes
1 answer

Subclassing NSInputStream to upload a particular portion of data from a local filepath

I am having a 100 MB of data in a single file. This 100 mb data will be divided virtually. i.e., I need to create an NSInputStream which points to different 5MB chunks. This is possible by creating the stream with NSData. But rather I'd like to know…
Sj.
  • 1,674
  • 2
  • 15
  • 23
2
votes
1 answer

CFStream with TLS

Is it possible to communicate on a CFStream with TLS 1.2? If yes, what is the best way? Setting a SSLContext or setting the CFReadStreamSetProperty? Unfortunately I cannot find any example for this.
Lupurus
  • 3,618
  • 2
  • 29
  • 59
2
votes
1 answer

How to Submit Permission(read_stream, publish_actions) for Review on Facebook

I want to get a user's wall post (photo or video) shared from Facebook pages. I am using graph.facebook.com/USER_ID/feed option to get this data via read_stream permission. Is there any other option available for the required task? I have to post…
1
vote
0 answers

Do I need to close stream if I didn't correctly open it?

Do I need to close stream if I didn't correctly open it? if (!CFReadStreamOpen(stream)) { //Do I need to add //CFReadStreamClose(stream) CFRelease(stream); stream = nil; }
Voloda2
  • 12,359
  • 18
  • 80
  • 130
1
vote
1 answer

Google Cloud Function returns undefined on bucket finalize buffer. Unable to debug code

I'm trying to process a .csv file using GCF. The file ist transferred from another bucket into this one and im trying to read in the file using the event (finalize). (I also need to format data structure on this file, that is why I need to read the…
1
vote
2 answers

Get file size on FTP download

im testing around with the "SimpleFTPSample" project from apple to understand how ftp with iOS works. i have added two lines in the "GetController.m" to get the size of the file to download. -(void)_startReceive { . . . // Open a CFFTPStream for…
Gregor
  • 126
  • 2
  • 4
1
vote
0 answers

Reasoning behind CFReadStreamCreateForHTTPRequest in OSX/IOS

I have recently written an asynchronous HTTP client in c++ for iOS/OSX. I was confused as to why headers were not arriving in my CFHTTPMessageRef response object until I realised that there was an object lurking as a property of the stream which…
Richard Hodges
  • 68,278
  • 7
  • 90
  • 142
1
vote
0 answers

Reading Data from CFReadStream and Converting it into NSString

I am having a problem with my iPhone application that I am building. The app sends a JSON request to a python server and then reads the JSON response from the server. I have the following function that sends data to the server and gets the response…
Ian E.
  • 11
  • 1
1
vote
2 answers

iOS - Setting delegate of input stream to another class

i am wondering that if it is possible to set the delegate of input stream to another class. So far all examples i have encountered are with self: [inputStream setDelegate:self]. I want to set delegate to another class like a ViewController not self.…
1
vote
1 answer

get the file size of a CFHTTPStream

How to get a file size of a CFHTTPStream. Suppose a file called "http://testserver.com/test.jpg " is available to read. Here I need to get the file size "test.jpg", this I need to display progress while using CFReadStreamRead. Or in other words I…
Mohsin
  • 11
  • 2
1
vote
0 answers

VPN blocking incoming reads CFReadStreamRef iOS

CFReadStreamRef used in CFStream connection to websocket. Properties set: // Ensure the CF & BSD socket is closed when the streams are closed. CFReadStreamSetProperty(theReadStream, kCFStreamPropertyShouldCloseNativeSocket, kCFBooleanTrue); // so…
msv
  • 11
  • 2
0
votes
1 answer

CFStream IOS Socket communication

how can i clear an CFStream buffer? Everytime i read from socket there is still data from an old request, i mean complete response to an old request not just a fragment of it. Am i missing something ? This is a function i use to initialize the…
Andreas
  • 397
  • 4
  • 18
  • 37
1
2