MAC OSX interprocess Communication

Source: Internet
Author: User

There are many types of IPC methods under Mac OS, some of which are the following.
1. Mach API
2. Cfmessageport
3. Distributed Objects (DO)Nsdistributednotificationcenter
4. Apple Events
5. UNIX Domain sockets
6. Internet Sockets or XPC (nsconnection)

7. Memory Mapping


There are pipe,nstask, Message Queuing, remote procedure calls, notifications, semaphores, and lock settings .

The 1th type is too low-level, and few people use Apple nor recommend it.
The 2,3,4 is a higher-level communication mechanism offered by Apple.
5th, 6 kinds of people should know, with the sockets method of dispersion, better transplant. 5 and 6 There are some differences, 5 using UNIX file system as a communication medium, you can use the UNIX file permission system to do communication restrictions, its other name is called IPC sokets,6 can do the machine communication between the local IPC can also do, but to do some extra effort.
The 7th kind of data is suitable for the large case.

1. If your interprocess communication is not frequent, just send some asynchronous signals, do is a good choice, that is, Nsdistributednotificationcenter.
2. If your interprocess communication is frequent, but the amount of data is small, you need a high degree of responsiveness, domain sockets is good.
3. Finally if the inter-process communication is frequent, the data flow is huge such as audio, picture, etc., need real-time level, choose memory Mapping.

MAC OSX interprocess Communication

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.