summaryrefslogtreecommitdiffstats
path: root/examples/network/doc/src/fortuneserver.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'examples/network/doc/src/fortuneserver.qdoc')
-rw-r--r--examples/network/doc/src/fortuneserver.qdoc23
1 files changed, 7 insertions, 16 deletions
diff --git a/examples/network/doc/src/fortuneserver.qdoc b/examples/network/doc/src/fortuneserver.qdoc
index 0b110783aa..acd05da696 100644
--- a/examples/network/doc/src/fortuneserver.qdoc
+++ b/examples/network/doc/src/fortuneserver.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -11,8 +11,8 @@
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
@@ -20,7 +20,7 @@
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -73,17 +73,8 @@
using QTcpSocket. First we create a QByteArray and a QDataStream object,
passing the bytearray to QDataStream's constructor. We then explicitly set
the protocol version of QDataStream to QDataStream::Qt_4_0 to ensure that
- we can communicate with clients from future versions of Qt. (See
- QDataStream::setVersion().)
-
- \snippet fortuneserver/server.cpp 6
-
- At the start of our QByteArray, we reserve space for a 16 bit integer that
- will contain the total size of the data block we are sending. We continue
- by streaming in a random fortune. Then we seek back to the beginning of
- the QByteArray, and overwrite the reserved 16 bit integer value with the
- total size of the array. By doing this, we provide a way for clients to
- verify how much data they can expect before reading the whole packet.
+ we can communicate with clients from future versions of Qt (see
+ QDataStream::setVersion()). We continue by streaming in a random fortune.
\snippet fortuneserver/server.cpp 7