Questions tagged [nsoutputstream]

The NSOutputStream class is a subclass of NSStream that provides write-only stream functionality.

101 questions
0
votes
1 answer

How to save data to a file using outputstreams or in any efficient way?

I have implemented in app purchase in my application,and the content i need to download from the store would be large.All these days i have been using dictionary to store the received data from the connection:didReceiveData and finally store the…
Dinakar
  • 1,198
  • 15
  • 37
0
votes
0 answers

Writing json string using NSOutPutStream is not working in WatchOS

i have network layer written in objectiv-c for the watchOS. writing a json string on NSOutPutStream is not working, but the same thing is working in iOS project. //writing json string on writeStream NSString *sendString =…
Code cracker
  • 3,105
  • 6
  • 37
  • 67
0
votes
1 answer

NSOutputStream giving -1 bytes?

NSDictionary *bundle = [NSDictionary dictionaryWithObjectsAndKeys:message,@"message", toUserName, @"receiver",fromUserName, @"sender", nil]; NSData *data = [NSKeyedArchiver archivedDataWithRootObject:bundle]; NSOutputStream…
lolwut
  • 3
  • 1
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 (![urlStr…
Junior Bill gates
  • 1,858
  • 4
  • 20
  • 33
0
votes
1 answer

NSOutputStream, how to output data properly after the NSStreamEventHasSpaceAvailable event has passed?

I add messages I want to send to a server to a queue: typedef struct StreamOutputQueue{ char message[513]; struct StreamOutputQueue * next; } StreamOutputQueue; When I get the event NSStreamEventHasSpaceAvailable I send the first message in…
Matthew Mitchell
  • 5,293
  • 14
  • 70
  • 122
0
votes
0 answers

How to get image from NSOutputStream in Objective-C

I am using twilio chat SDK, in that I am doing store and retrieve the image. So to retrieve the image from twilio I am getting NSOutputStream, And I don't know that how to convert NSOutputStream to image. Please see the below code which provided by…
Mihir Oza
  • 2,768
  • 3
  • 35
  • 61
0
votes
1 answer

NSOutputStream or twisted reactor merging TCP packet data

I'm working on some networking code for an iPhone application that interfaces with a Python Twisted backend. I've been running into a problem recently where it appears as though either my NSOutputStream is doubling up the payload on send OR twisted…
0
votes
1 answer

CHCSVWriter memory usage for writing bigger CSV files

I want to minimize memory usage when writing data to a CSV file. For bigger tables it uses more memory, even if it is temporary. Could someone suggest how to reduce memory usage? Maybe I could separate the action for bigger tables, write more…
0
votes
1 answer

Send and receive key/value pair using gcdasyncsocket over wifi

I've made an iOS app that receives RSSI values from a BLE Beacon and sends (using GCDAsynSocket) it to a connected MacBook over wifi. My next app on the MacBook receives the RSSI values and saves (using NSOutpuStream class) it in .txt format. Now, I…
santobedi
  • 866
  • 3
  • 17
  • 39
0
votes
1 answer

Synchronize AudioUnit callback with NSOutputStream

I'm recording audio using an Audio Unit, then writing that data into an NSOutputStream which is part of a bound pair that I'm using to POST that data over HTTP. My problem is the audio unit recording callback and the NSOutputStream hasSpaceAvailable…
Roshan Krishnan
  • 187
  • 1
  • 3
  • 13
0
votes
1 answer

NSOutputStream to know when data has been read in the other side

I'm sending audio from the microphone in realtime from an iOS device to a server. The problem that I have: When it gets disconnected for any reason, I don't know actually how many data has been read in the server. I would like this to be consistent.…
Pablo Martinez
  • 1,573
  • 12
  • 31
0
votes
1 answer

Writes to NSOutputStream after performing work on background thread don't work

I have a program that is sending large files over NSStreams after some initial processing. The flow of the application goes like this: 1) Two devices connect to each other, open their input and output streams, and schedule their run loops: …
user3062913
  • 353
  • 2
  • 10
0
votes
1 answer

Use NSOutputstream and NSInputstream to write and read every interval

I'm trying to use NSOutputstream and NSInputstream to write and read every interval, say 5 seconds. This is to communicate with a C# program on windows in P2P fashion. I want to use NSOutputstream to send the C# program a request every 5 seconds and…
Bon
  • 3,073
  • 5
  • 21
  • 40
0
votes
2 answers

Using NSOutputStream to output the current time to the Server

I'm Using NSOutputStream to Output data from the client (IOS device ) to the server (PC Device). I can send data successfully to the server, I just want to add the Current Time using NSOutputStream. How can i send the current time using…
Assam AlZookery
  • 479
  • 4
  • 15
0
votes
0 answers

iOS:How to transfer/stream video directly to file system/album

So I'm currently working on a data-transfer app. The approach that I have working right now is, I'm using sockets to transfer files and my question was specifically in regards to video files. So right now, I basically right the video that is being…
David West
  • 552
  • 2
  • 9
  • 21