1 /****************************************************************************
3 ** Copyright (C) 2015 The Qt Company Ltd.
4 ** Contact: http://www.qt.io/licensing/
6 ** This file is part of the documentation of the Qt Toolkit.
8 ** $QT_BEGIN_LICENSE:FDL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The Qt Company. For licensing terms
14 ** and conditions see http://www.qt.io/terms-conditions. For further
15 ** information use the contact form at http://www.qt.io/contact-us.
17 ** GNU Free Documentation License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Free
19 ** Documentation License version 1.3 as published by the Free Software
20 ** Foundation and appearing in the file included in the packaging of
21 ** this file. Please review the following information to ensure
22 ** the GNU Free Documentation License version 1.3 requirements
23 ** will be met: http://www.gnu.org/copyleft/fdl.html.
26 ****************************************************************************/
30 \title Inter-Process Communication in Qt
31 \brief Inter-Process communication in Qt applications.
33 \ingroup technology-apis
34 \ingroup qt-basic-concepts
37 Qt provides several ways to implement Inter-Process Communication
38 (IPC) in Qt applications.
42 The cross-platform \l{QtNetwork} module provides classes that make
43 network programming portable and easy. It offers high-level
44 classes (e.g., QNetworkAccessManager, QFtp) that communicate using
45 specific application-level protocols, and lower-level classes
46 (e.g., QTcpSocket, QTcpServer, QSslSocket) for implementing
49 \section1 Shared Memory
51 The cross-platform shared memory class, QSharedMemory, provides
52 access to the operating system's shared memory implementation.
53 It allows safe access to shared memory segments by multiple threads
54 and processes. Additionally, QSystemSemaphore can be used to control
55 access to resources shared by the system, as well as to communicate
60 The \l{QtDBus} module is a Unix-only library you can use to
61 implement IPC using the D-Bus protocol. It extends Qt's
62 \l{signalsandslots.html} {Signals and Slots} mechanism to the IPC
63 level, allowing a signal emitted by one process to be connected to
64 a slot in another process. This \l {D-Bus} page has detailed
65 information on how to use the \l{QtDBus} module.
67 \section1 Qt COmmunications Protocol (QCOP)
69 The QCopChannel class implements a protocol for transferring messages
70 between client processes across named channels. QCopChannel is
71 only available in \l{Qt for Embedded Linux}. Like the \l{QtDBus}
72 module, QCOP extends Qt's \l{Signals and Slots} mechanism to the
73 IPC level, allowing a signal emitted by one process to be
74 connected to a slot in another process, but unlike QtDBus, QCOP
75 does not depend on a third party library.