• 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
Re: Subclassing NSPort (or NSSocketPort)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subclassing NSPort (or NSSocketPort)


  • Subject: Re: Subclassing NSPort (or NSSocketPort)
  • From: Wade Tregaskis <email@hidden>
  • Date: Wed, 23 Jul 2003 09:07:45 +1000

There is a great deal of documentation, just not in Foundation. I think what is there
suffices. The NSPortMessage class says what the components are. And NSPort
documents states what facilities it provides access to: mach ports and sockets.

I did manage to find a lot of the info I needed, after doing a very thorough read of the DO docs. The problem is that all the information relevant to NSPort's and the like is hidden in the various concept overviews, not in the class documentation where it logically belongs (or should at least be repeated). Hopefully someone at Apple pays attention to this. (FWIW, some information I had to get from a 1997 archive of the Foundation docs, found via Google!).

I don't think the problem is with a lack of understanding of sockets and the like. I of course have my socket setup and ready to go. The problem is in understanding exactly what an NSPort has to do, in a simple procedural way. I think I've nailed it down now, but one last thing bugs me - how exactly am I supposed to encode my NSPort subclass? I'm not sure whether I'm supposed to do it via the NSCoding protocol, or just do it internally when I'm given my subclass to transmit, but either way - what exactly must I do at the other end? Looking at the GnuStep NSSocketPort, they appear to encode only the socket's address and port, and then find an existing socket with that address and port at the other end. Is it a simple matter of "connecting" the real Port at the sending end to a symbolic instance at the receiving end, or is the the receiving end Port supposed to actually work [and send data back to the original sender]?

Wade Tregaskis
-- Sed quis custodiet ipsos custodes?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Subclassing NSPort (or NSSocketPort) (From: James Quick <email@hidden>)

  • Prev by Date: RE: Button IB action on rename
  • Next by Date: RE: Can a subclass of NSDictionary do this?
  • Previous by thread: Re: Subclassing NSPort (or NSSocketPort)
  • Next by thread: Re: Subclassing NSPort (or NSSocketPort)
  • Index(es):
    • Date
    • Thread