NSInputStream
is an Objective-C objective-c class on iOS ios,
a subclass of NSStream
nsstream that provides read-only stream functionality. NSInputStream
is “toll-free bridged” with its Core Foundation counterpart, CFReadStreamRef
.
Questions tagged [nsinputstream]
150 questions
1
vote
3 answers
Transfer Multiple Images via NSInputStream/NSOutputStream
I have two NSInputStream and NSOutputStream connected to each other via network. I want to transfer core data objects and associated images from one device to other device. I have successfully converted the core data objects into JSON and…

Abbas Awan
- 113
- 1
- 14
1
vote
1 answer
NSInputStream and NSOutputStream problems
I have two NSInputStream and NSOutputStream between devices that are connected to each other via network. When I write something in output stream, the data is written until the NSStreamEventEndEncountered event occurs. I close the output stream but…

Abbas Awan
- 113
- 1
- 14
1
vote
1 answer
Should [nsInputStream read:...] return if [nsInputStream close] is called by another thread?
It seems to me that any NSInputStream object should pop out of its read: method if the stream is closed by another thread regardless of the other end of the socket connection. But in some cases this does not appear to be true. It seems that unless…

user574771
- 999
- 2
- 10
- 20
1
vote
0 answers
Calling open on NSInputStream subclass
I'm trying to subclass NSInputStream, but when I call open on my subclass, the program crashes with the 'open only defined for abstract class' exception. I read the documentation for NSStream which says I need to implement open among other methods,…

kurgan
- 83
- 9
1
vote
1 answer
using NSInputStream/NSOutputStream to communicate over TCP (iPhone)
Is it possible to do TCP communications using NSInputStream/NSOutputStream on iPhone? The example apple gives in their documentation uses [NSStream getStreamsToHost] and that isn't supported on iPhone. I have seen other posts which use CFStream to…

Locksleyu
- 5,192
- 8
- 52
- 77
0
votes
1 answer
NSInputStream open BAD_ACCESS
The below is my code to upload log files to FTP, and the problem is sometimes it crashes when execute [mInputStream open]. XCode show me BAD_ACCESS. I guess it may result from uploading a big-size file. However, BADACCESS sometimes happens, even…

user970287
- 21
- 5
0
votes
1 answer
How to signal an NSStreamEventEndEncountered on an NSInputStream reading from NSMutableData
In Cocoa, I've setup two NSThreads, one producer and one consumer.
The producer appends data to an NSMutableData, and the receiver opens an NSInputStream from that data and reads in chunks.
The producer thread writes a lot faster than the consumer…

Hans Sjunnesson
- 21,745
- 17
- 54
- 63
0
votes
1 answer
handling accessory state in iOS with EAAccessory
I am working on an EAAccessory project, and generally have everything working. The accessory is a remote with 5 buttons that interfaces with the dock, and the dock sends commands to my app. This works fine. However, I've been asked to keep track of…

pkananen
- 1,325
- 1
- 11
- 23
0
votes
1 answer
iphone function of istream and ostream
can anyone tell me the funcion of istream and ostream in the following code and how can i declare istream and ostream as i hv picked the code from net m not having much knowledge about the code
NSString *urlStr = @"192.168.178.26";
if (
Junior Bill gates
- 1,858
- 4
- 20
- 33
0
votes
2 answers
about the NSInputstream
-(NSString*)dateFilePath{
NSArray *paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory=[paths objectAtIndex:0];
return [documentsDirectory…

user768959
- 1
- 1
0
votes
1 answer
NSURLConnection and bound pair of streams (CFStreamCreateBoundPair or CFStreamCreateBoundPairCompat) not working on iPhone 3G
I'm using SimpleURLConnections example to implement multipart/form-data POST request using bound pair of streams. It works great in Simulator and on iPhone 3GS/iPhone 4.
When I try it on iPhone 3G (running 3.1.3) no data gets sent to the server.…

Alex Chugunov
- 728
- 5
- 10
0
votes
1 answer
Read numbers from file using NSInputStream
I am trying to read some input numbers from the file in objective C using NSInputStream. But unable to do so, I don't want to use readContentsFromFile api, but NSInputStream instead. Please suggest on how to do so.
Important things I am looking at …

Nilesh Agrawal
- 3,002
- 10
- 26
- 54
0
votes
1 answer
SocketStream::read crashes
We use an in NSInputStream to receive data from an IMAP-server. We see a stange crash in Xcodes Crashes that we are not able to reproduce. The InputStream is initialized like this (i omitted some sanity-checks):
- (void)getStreamsToServer:(NSString…

Tobias
- 1,220
- 17
- 35
0
votes
1 answer
How to connect to wss socket where host name has additional path using NSStream?
I'm trying to connect to wss socket, and the host name looks like this: "myhostname.com/ws/v2".
Here is how I start the connection:
let host = "myhostname.com/ws/v2"
CFStreamCreatePairWithSocketToHost(kCFAllocatorDefault, host as CFString, 443,…

almas
- 7,090
- 7
- 33
- 49
0
votes
1 answer
nsoutputstream stuck in status 1(NSStreamStatusOpening = 1) - iOS - objective c
i try to upload an iPod music to ftp server.
so using AVAssetExportSession, i make a file at documents folder
exportSession.outputURL = [NSURL fileURLWithPath:musicFilePath];
[exportSession exportAsynchronouslyWithCompletionHandler:^{
…

Juhyun Park
- 11
- 4