qt5base-lts/examples/network
Mårten Nordheim 226d06402b Network-chat: Fix remote peer making multiple connections
The system was just treating IP (and optionally port) as a unique
identifier, so if a peer had multiple possible paths to a client they
would connect multiple times.

This fixes that by generating using QUuid in each client.
We then use this during broadcast, replacing the username we
sent before (which was not used), and as part of the greeting.
The greeting now is more complex, since we need to send both
username and the ID.

Change-Id: I6c6c2ffd5198406aad48445a68dd6aab36de69c0
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-07-17 16:49:16 +00:00
..
blockingfortuneclient Fortune* Example: Bump QDataStream format version 2023-01-17 16:15:11 +01:00
broadcastreceiver examples: Connect Quit action to QCoreApplication::quit, not QWidget::close 2023-02-20 15:18:18 +01:00
broadcastsender examples: Connect Quit action to QCoreApplication::quit, not QWidget::close 2023-02-20 15:18:18 +01:00
dnslookup Fix deprecation warnings agains u"..."_qs in dnslookup.cpp 2023-06-07 10:26:04 +02:00
doc broadcast{receiver,sender}: update meta info 2023-07-12 11:29:55 +02:00
fortuneclient Fortune* Example: remove needless unset-ing of window flag 2023-01-17 16:15:11 +01:00
fortuneserver Fortune* Example: remove needless unset-ing of window flag 2023-01-17 16:15:11 +01:00
http HTTP example: Reflow QMessageBox usage in if-statement 2023-02-02 18:03:36 +00:00
multicastreceiver Clean up multicast examples 2023-03-23 16:02:28 +01:00
multicastsender Examples: Use PRIVATE CMake linkage 2022-11-30 14:48:50 +01:00
multistreamclient Examples: Use PRIVATE CMake linkage 2022-11-30 14:48:50 +01:00
multistreamserver Examples: Use PRIVATE CMake linkage 2022-11-30 14:48:50 +01:00
network-chat Network-chat: Fix remote peer making multiple connections 2023-07-17 16:49:16 +00:00
rsslisting Doc: RSS listing example: Fix file quoting 2023-06-15 11:34:17 +00:00
securesocketclient securesocketclient: Replace QLatin1Char with char16_t literal 2023-07-12 11:29:22 +02:00
secureudpclient Examples: Do not wrap custom types in Qt namespace 2023-01-02 23:16:30 +01:00
secureudpserver Examples: Do not wrap custom types in Qt namespace 2023-01-02 23:16:30 +01:00
shared Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
threadedfortuneserver Fortune* Example: Bump QDataStream format version 2023-01-17 16:15:11 +01:00
torrent Examples: Remove unnecessary Q_INIT_RESOURCE calls 2023-06-08 16:15:02 +00:00
CMakeLists.txt Move RSS listing example to networking 2023-06-14 11:57:31 +02:00
network.pro Move RSS listing example to networking 2023-06-14 11:57:31 +02:00
README Remove references to demos from docs. 2011-07-05 19:57:54 +02:00

Qt is provided with an extensive set of network classes to support both
client-based and server side network programming.

These examples demonstrate the fundamental aspects of network programming
with Qt.


Documentation for these examples can be found via the Examples
link in the main Qt documentation.