Is there a transactional data limit with NSStreams?
Is there a transactional data limit with NSStreams?
- Subject: Is there a transactional data limit with NSStreams?
- From: Carl Hoefs <email@hidden>
- Date: Tue, 08 Jul 2014 16:29:22 -0700
I'm using NSStreams to transfer science data sets from an OSX 10.8 app to an iOS 7 app. Both are ARC. This works fine for data transfer sizes up to about 18KB, it can go all day. But if a data set happens to be greater than that (some are up to 200KB), the write copies about 18KB worth of 1KB chunks (1KB per each NSStreamEventHasSpaceAvailable callback) and then craps out with: "The operation couldn’t be completed. Bad address."
Before each write I check self.outputStream.streamStatus, which is always NSStreamStatusOpen. During the write that dies, -stream:handleEvent: is invoked with an NSStreamEventErrorOccurred = "The operation couldn’t be completed. Bad address." The iOS app waits for more data until this error closes the connection on it.
Is there some sort of limit to how much data can be transferred per stream 'transaction'? Could ARC be releasing the stream before its time? It's very repeatable, and I've played with the transfer sizes, 1KB to 4KB, but to no avail. Once it hits 18KB, it's done.
What could I be overlooking?
Thx,
-Carl
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden