Inter-Process Communication in Qt
2011-11-03 16:47
921 查看
Inter-Process Communication in Qt
Qt provides several ways to implement Inter-Process Communication (IPC) in Qt applications.
TCP/IP
The cross-platform QtNetwork module provides classes that make network programming portable and easy. It offers high-level classes (e.g., QNetworkAccessManager, QFtp)that communicate using specific application-level protocols, and lower-level classes (e.g., QTcpSocket, QTcpServer,QSslSocket)
for implementing protocols.
Shared Memory
The cross-platform shared memory class, QSharedMemory, provides access to the operating system's shared memory implementation. It allows safe accessto shared memory segments by multiple threads and processes. Additionally, QSystemSemaphore can be used to control access to resources shared
by the system, as well as to communicate between processes.
D-Bus
The QtDBus module is a Unix-only library you can use to implement IPC using the D-Bus protocol. It extends Qt's Signalsand Slotsmechanism to the IPC level, allowing a signal emitted by one process to be connected to a slot in another process. This D-Bus page
has detailed information on how to use the QtDBus module.
Qt COmmunications Protocol (QCOP)
The QCopChannel class implements a protocol for transferring messages between client processes across named channels. QCopChannel isonly available in Qt for Embedded Linux. Like the QtDBus module,
QCOP extends Qt's Signals and Slots mechanism to the IPC level, allowing a signal emitted by one process to be connected to
a slot in another process, but unlike QtDBus, QCOP does not depend on a third party library.
相关文章推荐
- 3——Building Microservices: Inter-Process Communication in a Microservices Architecture
- Inter process communication
- Use Named Pipes and Shared Memory for inter process communication with a child process or two
- 消息队列IPC(inter process communication)小记
- Inter-Process Communication IPC
- 【IPC】Linux进程间通信(Inter Process Communication)通信方式
- Handle inter-process communication between PhantomJS and Golang processes via hixie-76 websockets
- Inter-partition communication in multi-core processor
- C# 进程间通信 (Process Communication in C#)
- Inter-Process Communication Affects Application Response Time
- Use Named Pipes and Shared Memory for inter process communication with a child process or two
- in house publish inter company
- detach process in nodejs
- TZC Intercommunication System
- Errors I got in django cms configurating process
- Putting Data and Business Process Integration in Context @ JDJ
- A simple in-process HTTP server for UWP
- sqlite in qt
- Qt 5.2.1 applications (32 bit) in CentOS (64 bit with gcc 4.8.2)
- Qt里出现 Cannot create children for a parent that is in a different thread