• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[Q] disposing of a stream object when NSStreamEventEndEncounterered is received?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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


  • Follow-Ups:
    • Re: [Q] disposing of a stream object when NSStreamEventEndEncounterered is received?
      • From: Michael Ash <email@hidden>
  • Prev by Date: Re: IntefaceBuilder IPhone TableView Size Question
  • Next by Date: Hillegass: Animation, NSProgressIndicator and Bindings
  • Previous by thread: Re: [pyobjc] Custom sheet and didEndSelector
  • Next by thread: Re: [Q] disposing of a stream object when NSStreamEventEndEncounterered is received?
  • Index(es):
    • Date
    • Thread