• 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: Mach Bootstrap_create_server, "server_command" parameter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mach Bootstrap_create_server, "server_command" parameter


  • Subject: Re: Mach Bootstrap_create_server, "server_command" parameter
  • From: Quinn <email@hidden>
  • Date: Wed, 18 Feb 2009 09:43:03 +0000

At 16:59 -0500 17/2/09, Michael Prenez-Isbell wrote:
Can NSMachPort be used for IPC? I don't see a way to make an NSMachPort
local or remote. It seems as if you already have to have a mach port to use
it.

If this is possible, is there a coding example?

Or is CFMessagePort a better way to go?

NSMachPort is part of the Distributed Objects suite of APIs, and isn't really designed for generic IPC.


CFMachPort /is/, however, it's pretty low level so you tend to run into the same sorts of issues as you would with raw Mach ports.

CFMessagePort is a pretty reasonable, albeit very simplistic, high-level abstraction for Mach IPC.

However, I really think you're better off using UNIX domain sockets. Regardless of how you use it, Mach IPC is tricky because:

o service discovery inevitably drags you into the whole Mach bootstrap namespaces issue; see TN2083 for details

o Mach ports are connectionless, which means you have to just through hoops to determine when clients come and go

Sockets provides an (IMO) easier and (certainly) better understood model of IPC.

S+E
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Mach Bootstrap_create_server, "server_command" parameter (From: Michael Prenez-Isbell <email@hidden>)

  • Prev by Date: Re: How to handle wake up from sleep
  • Next by Date: Set process' working set size explictly
  • Previous by thread: Re: Mach Bootstrap_create_server, "server_command" parameter
  • Next by thread: Set process' working set size explictly
  • Index(es):
    • Date
    • Thread