• 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: Using NSSocketPort
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using NSSocketPort


  • Subject: Re: Using NSSocketPort
  • From: Douglas Davidson <email@hidden>
  • Date: Mon, 22 Apr 2002 10:30:46 -0700

On Saturday, April 20, 2002, at 05:26 PM, Mike Laster wrote:

Does anyone have any sample code on how to use NSSocketPort? I'm trying to
write a server and can't figure out how to accept connections. NSSocketPort
seems to accept the connection if I telnet to the port, but the port
delegate is never called to inform my code about the new connection (or give
me access to the port object representing the new connection).

I currently do all of my networking through homegrown wrappers around the
BSD functions, but I would really like to find a way for the networking data
to simply be events off of the NSRunLoop so I can have a cleaner
architecture.

That's not what NSSocketPort does. To use a BSD socket as a run loop source, you can use CFSocket, in CoreFoundation. Another alternative is NSFileHandle; there are also third-party frameworks and code examples that do this.

Douglas Davidson
_______________________________________________
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: 
 >Using NSSocketPort (From: Mike Laster <email@hidden>)

  • Prev by Date: Probelm with NSLayoutManager notifications
  • Next by Date: Populating NSPopUpButton Question
  • Previous by thread: Re: Using NSSocketPort
  • Next by thread: Display Boolean Value in NSTableview
  • Index(es):
    • Date
    • Thread