• 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
NSStream Subclass and Runloops
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSStream Subclass and Runloops


  • Subject: NSStream Subclass and Runloops
  • From: Greg Hulands <email@hidden>
  • Date: Mon, 17 Oct 2005 19:41:34 +1000

Hi,
I am writing an NSStream subclass that wraps around a distributed object that another framework is vending over Bonjour. The only method of the object vended is - (int)retrievePacketsInto:(NSData **) data; basically it just returns a data buffer wrapped as an NSData. I wanted to wrap this up as a stream subclass, but I cannot use NSInputStream 's inputStreamWithData: as I have to poll the remote object to get more data to fill the local buffer. I have added the proxy's connection to the runloop. But cannot figure out how I can get a call back each pass through the runloop to get more data from the remote object. I cannot use the NSConnection's receivePort as it says the NSConnection is the delegate of the port. There are no delegate methods of the NSConnection that would invoke as the remote object only returns data when asked for it and does not send it willy nilly.


Because I cannot get a callback from the runloop, I cannot notify the delegate of the stream that data has arrived.

Any info on how to do this would be appreciated.

Regards,
Greg
_______________________________________________
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


  • Prev by Date: NSMatrix rows and columns
  • Next by Date: Re: Hashing a folder
  • Previous by thread: Re: NSMatrix rows and columns
  • Next by thread: Unicode character in app bundle name
  • Index(es):
    • Date
    • Thread