Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 5ab010e37991249ab4adaa24d6e39c6e > files > 226

qt5-qtdoc-5.1.1-2.fc18.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- connectivity.qdoc -->
  <title>Networking and Connectivity | QtDoc 5.1</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader"></div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#network-communication">Network Communication</a></li>
<li class="level1"><a href="#world-wide-web-support">World Wide Web Support</a></li>
<li class="level1"><a href="#inter-process-communication">Inter-Process Communication</a></li>
</ul>
</div>
<h1 class="title">Networking and Connectivity</h1>
<span class="subtitle"></span>
<!-- $$$topics-network-connectivity.html-description -->
<div class="descr"> <a name="details"></a>
<p>Qt provides classes for both high-level and low-level network communication, classes for web integration, and classes for interprocess communication.</p>
<p>For high-level network traffic, <a href="whatsnew51.html#qt-network">Qt Network</a> provides an abstraction layer over the operations used, showing only high-level classes and functions. Qt Network can also handle lower level protocols like TCP and UDP. Classes like QTcpSocket and QUdpSocket enable the developer to send and receive messages using the TCP or UDP protocol.Name resolution is done with QHostInfo. QHostInfo is called before creating a network connection with QTcpSocket or QUdpSocket. Filtering and redistributing network traffic via proxies can handled by the QNetWorkProxy class.</p>
<p>Qt Network also provides the Bearer Management API. It has functions that can start or stop network interfaces and roam between access points. It does however not take care of the network configurations itself. The platform needs to take care of that.</p>
<p>Qt Webkit offers a web browser engine that makes it possible to use web content in your application. Qt Webkit can render HTML, XHTML, and SVG documents, and execute Javascript.</p>
<p>Qt also offers functionalities for <i>inter-process communication</i> (IPC). The class <a href="ipc.html#qprocess">QProcess</a> is used to start external programs. Qt D-Bus provides support for D-Bus, an interprocess communication and remoteprocedure calling mechanism. It mostly communicates via a central server application, called a bus. However, it is also possible to let applications communicate directly with each other. QSharedMemory provides access to a shared memory segment by multiple threads and processes. It is however also possible for a single process to exclusively lock that shared memory.</p>
<a name="network-communication"></a>
<h2>Network Communication</h2>
<p>Qt supports a wide range of network communication, with a focus on HTTP, TCP, and UDP.</p>
<p>At the HTTP level, the <a href="whatsnew51.html#qt-network">Qt Network</a> module offers the network access API, which consists mainly of QNetworkRequest, QNetworkAccessManager, and QNetworkReply. Put simply, the QNetworkRequest resembles an HTTP request, which gets passed to the QNetworkAccessManager to send the request on the wire; this class returns a QNetworkReply, which enables parsing the HTTP reply. The network access API uses the socket classes mentioned below (for TCP and SSL) internally.</p>
<p>For communication at the socket level, QTcpSocket, QUdpSocket and QSslSocket should be used. These classes offer a synchronous API through the waitFor* methods as well as an asynchronous API; if possible (i.e&#x2e; if the event loop is running), the asynchronous API should always be preferred. Qt also offers QTcpServer to enable the server-side part of a TCP communication. Please note that there is no HTTP server class in Qt.</p>
<p>For secure communication via SSL, Qt Network offers a wide range of classes alongside the central QSslSocket, e.g&#x2e; QSslCertificate, QSslConfiguration and QSslError. The only supported backend for SSL in Qt is OpenSSL, which needs to be installed separately.</p>
<p>For mobile devices, Qt Network offers the bearer management API to track the status of a connection (e.g&#x2e; getting notified about online/offline status or whether Wifi or 3G is used).</p>
<p>Qt also offers HTTP support in QML by either using HTTP explicitly via XmlHttpRequest, or by transparently using HTTP URLs in e.g&#x2e; Image sources.</p>
<p>Related Topics:</p>
<ul>
<li><a href="whatsnew51.html#qt-network">Qt Network</a> - module documentation<ul>
<li>Network Programming API</li>
<li>Network Programming with Qt</li>
<li>Qt Network C++ Classes</li>
<li>Secure Sockets Layer (SSL) Classes</li>
<li>Bearer Management</li>
</ul>
</li>
<li>Resource Loading and Network Transparency - network and URL transparency in QML</li>
</ul>
<a name="world-wide-web-support"></a>
<h2>World Wide Web Support</h2>
<p>Qt makes it easy to embed web content into your Qt application using features of the Qt WebKit layout engine. The Qt WebKit module equips Qt with support for a broad range of standard web technologies that make it possible to embed HTML content styled with CSS and scripted with JavaScript into your Qt application. QtWebKit facilitates both integration with traditional QWidget based desktop applications as well as embedding into Qt Quick QML applications.</p>
<p>For more information see <a href="topics-web-content.html">Integrating Web Content</a>.</p>
<a name="inter-process-communication"></a>
<h2>Inter-Process Communication</h2>
<p>Qt provides several ways to implement Inter-Process Communication (IPC) in Qt applications.</p>
<p>The cross-platform <a href="whatsnew51.html#qt-network">Qt Network</a> module provides classes that make network programming portable and easy. It offers high-level classes (e.g&#x2e;, QNetworkAccessManager, QFtp) that communicate using specific application-level protocols, and lower-level classes (e.g&#x2e;, QTcpSocket, QTcpServer, QSslSocket) for implementing protocols.</p>
<p>The cross-platform shared memory class, QSharedMemory, provides access to the operating system's shared memory implementation. It allows safe access to 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.</p>
<p>The Qt D-Bus module is a Unix-only library you can use to implement IPC using the D-Bus protocol. It 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.</p>
<p>The cross-platform class <a href="ipc.html#qprocess">QProcess</a> can be used to start external programs as child processes, and to communicate with them. It provides an API for monitoring and controlling the state of the child process. <a href="ipc.html#qprocess">QProcess</a> gives access to the input/output channels of child process by inheriting from QIODevice.</p>
<p>The QLocalSocket class provides a local socket. On Windows this is a named pipe and on Unix this is a local domain socket. The QLocalServer class provides a local socket based server. This class makes it possible to accept incoming local socket connections.</p>
<p>Related Topics:</p>
<ul>
<li>Qt D-Bus - module documentation<ul>
<li>Using QtDBus Adaptors</li>
<li>QLocalSocket</li>
<li>Declaring Signals in D-Bus Adaptors</li>
<li>Declaring Slots in D-Bus Adaptors</li>
<li>The QtDBus Type System</li>
<li>QtDBus XML Compiler (qdbusxml2cpp)</li>
</ul>
</li>
</ul>
</div>
<!-- @@@topics-network-connectivity.html -->
</div>
</div>
</div>
<div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>