site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com - Kevin On Nov 14, 2005, at 10:28 PM, Rob Ballantyne wrote: I'm trying to use the mach_msg interface to pass around messages between two userland tasks. I'm having trouble with the calls to mach_msg complaining about an 'invalid msg-header' when I try to associate a local_port (and port_right?) with the message so that the server can respond. If I set local_port to MACH_PORT_NULL I can send to the server, setting it to anything other than that gives me the invalid msg-header error. Is it possible with out setting the MACH_MSGH_BITS_COMPLEX to enable a server response or does the entire message transaction have to be of the 'complex' type to send a send-right to the server process? Is there documentation on the mach_msgh_bits field of the header? I've got the mach_msg_header.html document in xnu-*/osfmk/man and it describes the bits but doesn't talk about appropriate use of them. Is there anything that talks about correct use of the bit fields? Finally, does anyone have a good example of a non-MIG server that demonstrates much of what I've mentioned above? _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... CFMessagePort is a good example of using mach_msg for round-trip communication. <http://www.opensource.apple.com/darwinsource/10.4.3/CF/ RunLoop.subproj/CFMessagePort.c> This email sent to site_archiver@lists.apple.com