Questions tagged [cfstream]
51 questions
1
vote
0 answers
NSStream does not call it's delegate when closed everytime
I have a couple of NSStreams (in & out TLS) to a server, I can send and receive data via them just fine but after a while maybe 5 minutes after without any traffic, connection seems to be closed on it's own but my delegate does not called with…

volution
- 533
- 3
- 15
1
vote
1 answer
CFReadStreamRef vs. NSInputStream *
The difference between NSInputStream * and CFReadStreamRef seems to be that the first one is an objective C object, while the second one is a native struct. Nevertheless, they are toll-free bridged.
I want to implement a program based on network…

Etan
- 17,014
- 17
- 89
- 148
1
vote
1 answer
Upload audio - http streaming
I'm trying to upload a linear file under http in streaming mode.
The idea is do this steps simultaneously,
1) Thread 1: record an audio file and store it in a temp file
2) Thread 2: Take n bytes from temp file and send it to an http server.
How…

pcambre
- 141
- 11
1
vote
1 answer
CFStream SSL error -9800
My iOS app contains 2 versions: server and client. Server posts a service via Bonjour and waits for a client. Client searches that services and connects to the server. After that all communications implemented through CFSockets.
Here is my code to…

dymv
- 3,252
- 2
- 19
- 29
1
vote
2 answers
Call to CFReadStreamRead stops execution in thread
NB: The entire code base for this project is so large that posting any meaningful amount wold render this question too localised, I have tried to distil any code down to the bare-essentials. I'm not expecting anyone to solve my problems directly…

Richard Stelling
- 25,607
- 27
- 108
- 188
0
votes
1 answer
iPhone: CFReadStreamRead storing bytes as signed instead of unsigned
From my PC app I am sending socket data to my iPhone. When the data arrives it is being stored as a signed value instead of unsigned (uint8). So I can't get any values in above 127.
When I send a 0xFF it defaults back to 0x3f.
Is CFReadStreamRead…

user862821
- 3
- 2
0
votes
1 answer
Stream delegate not called
I am trying to send data between an iPhone and a BeagleBone Black Wireless over TLS. However, I am encountering some strange issues. The issue that this question is about is why the delegate method stream(_:handle:) is not called. I've read the…
0
votes
0 answers
Swift TCP client check connection ipv4
If the Wifi connection is active and I'm on the network 192.168.1.xxx and try to establish the connection:
var readStream: Unmanaged?
var writeStream: Unmanaged?
///77.246.237.150
…
0
votes
0 answers
CFStream : NSOutputStream not working
I am developing iOS app which required to send message to Android Socket server.
I am facing a weird situation. If I continuously write data in NSOutputStream then Android device get Message but, If I write code into While loop or any If condition…

girish_pro
- 838
- 9
- 18
0
votes
1 answer
Unable to write using CFWriteStream
I have created a UDP CFSocket and I'm able to send data without using any file handles. But, when I create CFReadStreamRef, CFWriteStreamRef and use them to send data, it fails. The control does not return. Can anyone help me regarding this? The…

vinay hegde
- 99
- 10
0
votes
1 answer
setting CFStream property failing
I'm trying to set up TLS connection with SNI. Problem is that the first property setting call returns 1 indicating that it was accepted. The following two return 0, which means they didn't go through. What could be the reasoning be?
At some point I…

Kelo
- 453
- 1
- 3
- 17
0
votes
2 answers
How to create a NSInputStream/NSOutputStream pair by accepting a server socket?
I know that you can create a NSInputStream and NSOutputStream pair (toll-free bridged to CFReadStream, CFWriteStream) by opening a TCP client connection using CFStreamCreatePairWithSocketToHost according to the Stream Programming Guide.
How can one…

yonran
- 18,156
- 8
- 72
- 97
0
votes
1 answer
How to connect to public ip using CFStream in iOS
I am a beginner in iOS and objective C
I am using the following code in order to connect with the server...
When i am connecting locally using the ip 192.168.10.246 the code works fine and it gets connected but when i try to use a public ip instead…

Adolf Dsilva
- 13,092
- 8
- 34
- 45
0
votes
2 answers
CFStream connection cannot connect while using public ip
I am a newbie to iOS and Objective c....
In my app i am establishing a socket connection to my server using the CFStream.. the problem is
when i run my program using the local ip (192.168.10.246) the connection is established, but when i replace it…

Adolf Dsilva
- 13,092
- 8
- 34
- 45
0
votes
1 answer
MacOSX: creating a CFStream/NSStream with specific client and server ports
I'm trying to translate the client side of a (POSIX/winsocks) socket-based TCP/IP protocol to native Mac OS X frameworks. Under this protocol, a client port is set up at a specified port, and this socket is then connected to the server at another…

RJVB
- 698
- 8
- 18