Re: Is there a transactional data limit with NSStreams?
Re: Is there a transactional data limit with NSStreams?
- Subject: Re: Is there a transactional data limit with NSStreams?
- From: "Justin C. Walker" <email@hidden>
- Date: Tue, 08 Jul 2014 17:11:05 -0700
On Jul 8, 2014, at 16:54 , Carl Hoefs wrote:
> On Jul 8, 2014, at 4:40 PM, Jens Alfke <email@hidden> wrote:
>
>>
>> On Jul 8, 2014, at 4:29 PM, Carl Hoefs <email@hidden> wrote:
>>
>>> Is there some sort of limit to how much data can be transferred per stream 'transaction’?
>>
>> No. Streams don’t have transactions, and they’re infinite-length by definition.
>>
>> You haven’t given any details about how you’re sending the data. Presumably you’re using TCP. It sounds like there’s something wrong with the API calls you’re using to write to the stream.
>>
>> Also, what’s the exact error code/domain in the NSError you get? “Bad address” is kind of vague.
>>
>> —Jens
>
>
> Yes, I'm using TCP sockets, and using -write:maxLength: (as per https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Streams/Articles/WritingOutputStreams.html)
>
> Printing out aStream.streamError gives this:
> Error Domain=NSPOSIXErrorDomain Code=14 "The operation couldn’t be completed. Bad address"
>
> From what I can gather, this is sort of a generic error message, indicating perhaps that the connection went away in the middle of using it. But then I would think I would get a callback to -stream:handleEvent:, but I don't. If there's nothing intrinsic with NSStreams limiting the data transfer size, then maybe I have a data overrun issue...
That error is almost always a result of accessing an invalid address (e.g., a write to a write-protected area, or accessing a "hole" in your address space).
HTH
Justin
--
Justin C. Walker, Curmudgeon at Large
Institute for the Absorption of Federal Funds
-----------
I'm beginning to like the cut of his jibberish.
-----------
_______________________________________________
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