[Q] disposing of a stream object when NSStreamEventEndEncounterered is received?
[Q] disposing of a stream object when NSStreamEventEndEncounterered is received?
- Subject: [Q] disposing of a stream object when NSStreamEventEndEncounterered is received?
- From: JongAm Park <email@hidden>
- Date: Tue, 27 Jan 2009 11:25:58 -0800
Hello.
According to "Stream Programming Guide for Cocoa : Writing to Output
Streams", it says :
"When an NSOutputStream object concludes writing data to an output
stream, it sends the delegate a |NSStreamEventEndEncountered| event in a
|stream:handleEvent:| message. At this point the delegate should dispose
of the stream object by doing the mirror-opposite of what it did to
prepare the object. In other words, it should first close the stream
object, remove it from the run loop, and finally release it."
However, I have a system with which a server send back a notification
when a client registers that it want to get some notification to the
server. For the system, a stream or a channel which requested the
notification should be remained open to get notifications from the
server afterwards.
Under this scenario, can't I use the Run-Loop based meachanism? is there
any way to keep the stream open?
Thanks,
JongAm Park
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden