• 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: NSSocketPort initRemoteWithTCPPort is never valid
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSocketPort initRemoteWithTCPPort is never valid


  • Subject: Re: NSSocketPort initRemoteWithTCPPort is never valid
  • From: "Adam R. Maxwell" <email@hidden>
  • Date: Wed, 15 Jul 2009 16:02:27 -0700


On Jul 15, 2009, at 11:19 AM, Ken Thomases wrote:

On Jul 15, 2009, at 11:49 AM, Kirk Kerekes wrote:

An NSSocketPort is intended for use with Distributed Objects and
NSConnection or, at least, to communicate with another NSSocketPort at
the other end.

The documentation used to state this, possibly erroneously. It no longer does so:


"NSSocketPort is a subclass of NSPort that represents a BSD socket. An NSSocketPort object can be used as an endpoint for distributed object connections"

NSSocketPort is quite usable as an abstraction of a BSD socket. I have written code that communicates with Winsock sockets using NSSocketPort.

How did you force it to connect? What methods did you use to send and receive data? Or did you just pluck out the socket fd and use that?

Most likely he's just using the fd, based on his post in this thread:

http://www.cocoabuilder.com/archive/message/cocoa/2008/12/5/224509

There is just no reason to use NSSocketPort for anything other than DO. Douglas Davidson has a good summary in that same thread:

http://www.cocoabuilder.com/archive/message/cocoa/2008/12/5/224544

The OP mentioned working with runloops and NSFileHandle, so CFSocket sounds like a more useful abstraction.

--
Adam

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

References: 
 >Re: NSSocketPort initRemoteWithTCPPort is never valid (From: Kirk Kerekes <email@hidden>)
 >Re: NSSocketPort initRemoteWithTCPPort is never valid (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Use Cocoa in QL Generator
  • Next by Date: Re: Use Cocoa in QL Generator
  • Previous by thread: Re: NSSocketPort initRemoteWithTCPPort is never valid
  • Next by thread: What is the difference between the -awakeFromNib and -init?
  • Index(es):
    • Date
    • Thread