Qt inter-process communication

Qt provides four kinds of inter-process communication way:

  1. Shared memory (shared memory) Interaction: This is an inter various platforms Qt supports are provided by way of process interaction.
  2. TCP / IP: The basic idea is the same machine as the above two processes a server, as a client, both of which interact through a network protocol. In addition to two processes on the same machine, this kind of interaction with ordinary C / S program is no different. Qt provides this QNetworkAccessManager be supported.
  3. D-Bus: freedesktop organization developed a low-cost, low-latency IPC implementation. Qt provides QtDBus module, to extend the signal slots mechanism to process level (we highlighted above are "normal" signal slots mechanism can not be achieved IPC), allows developers to send a signal in a process, by the groove function of other processes in response signal.

  

D_BUS is a low-cost, low-latency inter-process communication mechanism. Qt provides QtDBus modules, QtDBus module uses D- Bus protocol, the signal slots mechanism (Signal and Slot) extends to the process level, such that the developer may issue a signal process, other processes may be defined and then responding to other processes groove signals emitted.

    D -Bus is a high-level inter-process communication mechanism provided by the freedesktop.org project, licensed under the GPL release. D-Bus main purpose is to provide communication for the process in Linux desktop environment, but can Linux desktop environment and Linux kernel as a message to the event delivery process. 
The probability of the main bus D-Bus, the registration process may receive or send messages via the bus, waiting for a response after the kernel event registration process may, for example, a computer or a network state transition waiting issued shutdown command.
Currently, D-Bus has been used by most Linux distributions, developers can use the D- Bus achieve a variety of complex inter-process communication tasks. D -Bus is a message bus system, whose function is to cover all the needs of interprocess communication, and includes some special purpose. D- Bus is a communication process between the three-tier system, including: Interface Layer: an interface layer is provided by the library libdbus, D process can be used by libdbus library - Bus capacity. Layer bus: Bus layer is actually composed of D - providing Bus bus daemon. When the system starts running Linux, message routing and delivery charge of inter-process, including the Linux kernel messaging and Linux desktop environment. Layer packaging: Packaging series of layers Wrapper libraries based on the specific application framework. Dbus in QT is Dbus packaging layer libdbus used - Qt. To view the services and objects on the bus can make use of Dbus d - feet 'and qdbusviewer May be used to transmit signals dbus -send, to view the message flow may be used dbus-monitor Dbus

 

4.QCOP (Qt COmmunication Protocol): QCOP inside Qt is a communication protocol used for communication between different client address space in between the same or different internal processes. At present, this mechanism is only used Qt for Embedded Linux version.

 

http://www.360doc.com/content/18/0118/20/52164085_723170318.shtml

 

Guess you like

Origin www.cnblogs.com/xiangtingshen/p/11068134.html