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