The NSOutputStream class is a subclass of NSStream that provides write-only stream functionality.
Questions tagged [nsoutputstream]
101 questions
0
votes
1 answer
Couldn't save data in given path of document directory by NSOutputStream
How to save downloaded content/data in the given path in document directory by NSOutputStream. If i append file name with DD then it works (ex- DD/contentPath.zip), But if i append a path like DD/hello/contentPath.zip then it doesn't work. Why ? I…

Nuibb
- 1,800
- 2
- 22
- 36
0
votes
1 answer
iOS NSOutputStream split data after first sign
We are currently developing a TLS-server-client-application. For testing the client send a command with the content "0001" and the server sends an answer.
The client send the data via the write-method of an NSOutputStream. When the data is send…

Henning
- 421
- 2
- 11
- 22
0
votes
1 answer
NSOutputStream's hasSpaceAvailable method always returns False
In my app, I need to use polling instead of run loop while performing certain operations over the network.
My code looks like below
-(id) init
{
self = [super init];
if (self) {
CFReadStreamRef readStream;
CFWriteStreamRef…

vinay hegde
- 99
- 10
0
votes
1 answer
Sending Byte Array using NSOutputStream
I have To Send 8 Byte Array To IP I have my data as NSMutableArray Contains integer values between 0 and 255 And as far as I know I have to convert it to nsdata before sending it .
NSString *error;
NSData *data = [NSPropertyListSerialization…

Fadel Sabbagh
- 315
- 4
- 12
0
votes
1 answer
unable to forcefully cancel ftp download
I am using SimpleFTPSample to download and upload from FTP server. I have to cancel download after specific time regardless of completion and start uploading. But If I cancel the download and then start upload delegate method stream:handleEvent: is…

user1101733
- 258
- 2
- 14
0
votes
1 answer
Not able to swizzle NSOutputStream's write:MaxLength:
I have a requirement of writing a custom data, before the actual write of NSOutputStream happens.
To make swizzling code execute, i have created a category NSOutputStream(SwizzleWrite), which contains the following:
SEL originalSelector =…

user1125968
- 17
- 4
0
votes
1 answer
What's the advantages of using NSOutputstream?
I need to download large files from the Internet , and save it to local disk.
At first, i save the data like this:
- (void)saveToLocalFile:(NSData *)data withOffset:(unsigned long long)offset{
NSString* localFile = [self tempLocalFile];
…

foogry
- 835
- 7
- 17
0
votes
2 answers
Conversions in swift
I know this question must have been asked before in another form. I am trying to write to an NSOutputStream a message I am composing from different things from my view.
@IBAction func sendMessage(sender: UIButton!) {
var msg =…

tudoricc
- 709
- 1
- 12
- 31
0
votes
1 answer
Tilde in device name causing problems with NSOutputStream socket
In the networking between the iPhone and desktop versions of our application, the iPhone sends over the device name for use on the desktop. The problem is that some of the beta testers have tildes (`) in their device names. For some reason when this…

mjdth
- 6,536
- 6
- 37
- 44
0
votes
1 answer
Using base64 encoding with NSInputStream
I'm using RNCryptor to crypt files and for large files I use NSInputStream to separate file into chunks and to encode / decode those chunks. It worked great until I needed to base64 encode / decode chunks which are passed to streams.
Following code…

Josip B.
- 2,434
- 1
- 25
- 30
0
votes
1 answer
Better way to stream videio
Currently I am using AVFoundation to grab frames from iPhone camera then turn them to a UIImage then I transport it through the NSOutputStream I send it to my other device.
Unfortunately I get crashes from most likely too much memory as it hits…

Charlie
- 222
- 3
- 20
0
votes
1 answer
iOS - Use server external IP in FTP
I am developing an app that uploads data directly to FTP server i am using apple's simpleFTPSample example. All is working fine except when i try to access FTP outside my local network i can not connect to FTP server.
I got the problem that is i…

Hassy
- 5,068
- 5
- 38
- 63
0
votes
2 answers
How to resume data download in other views?
I am using AFNetworking to download an mp3 file. The download happens in a particular ViewController. Since the mp3 file is quite large, it takes a few minutes to complete the download. The problem is that when i go to another ViewController, the…

devdev101
- 241
- 1
- 5
- 14
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
0 answers
Fast way to write data to multiple files - Objective-C OSX
Currently, I'm serially creating/writing data to ~30,000 files using this code:
if ([[NSFileManager defaultManager] fileExistsAtPath:[_output_url path]]) {
//file already exists, append string to it
NSFileHandle *aFileHandle =…

objectiveccoder001
- 2,981
- 10
- 48
- 72