Re: looks like Intel vs. PowerPC difference
Re: looks like Intel vs. PowerPC difference
- Subject: Re: looks like Intel vs. PowerPC difference
- From: "Shawn Erickson" <email@hidden>
- Date: Thu, 3 Aug 2006 11:11:28 -0700
On 8/3/06, Andrei Tchijov <email@hidden> wrote:
It looks like
+[ NSStream (void)getStreamsToHost:(NSHost *)host port:(int)port
inputStream:(NSInputStream **)inputStream outputStream:
(NSOutputStream **)outputStream ]
works slightly different on Intel, compare to PowerPC. On PowerPC,
when this method fails, it will set inputStream/outputStream to nil.
It looks like on Intel, in case of failure, it leaves inputStream/
outputStream untouched.
Does it sound right, or am I hallucinating?
The docs don't state what will happen to inputStream and outputStream
in the event of a failure (to bad it isn't stated). So you can't
safely depend on what the implementation will do since it isn't
specified. In a situation like that I would initialize them to nil
before sending that message.
Additionally I would query the status of the returned stream to
validate the state is as you expect (see -[NSStream streamStatus]).
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden