qt5base-lts/examples/network/network-chat
Mårten Nordheim 2a80adc2f6 Network-chat example: Use QHash for peers
We don't key it on IP address anymore so we can drop
the use of QMultiHash.
This also requires moving the connections for error and disconnected
to readyForUse so we don't remove an active connection when a second
connection attempt happens from the same peer process.
But since we still need to deallocate those connection attempts
if they error out or simply disconnect, we connect their signals to the
QObject::deleteLater slot. In some cases we might call deleteLater twice
but that's fine.

Change-Id: I48c27de1e51a52ef61cfb941a7a81b358ae9ce3f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
2023-07-17 18:49:16 +02:00
..
chatdialog.cpp Network chat: update includes 2023-05-31 12:55:54 +02:00
chatdialog.h Network chat: make ctors explicit 2023-05-31 12:55:55 +02:00
chatdialog.ui Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
client.cpp Network-chat example: Use QHash for peers 2023-07-17 18:49:16 +02:00
client.h Network-chat example: Use QHash for peers 2023-07-17 18:49:16 +02:00
CMakeLists.txt Network chat: Use QStringBuilder 2023-05-31 12:55:56 +02:00
connection.cpp Network-chat: Fix remote peer making multiple connections 2023-07-17 16:49:16 +00:00
connection.h Network-chat: Fix remote peer making multiple connections 2023-07-17 16:49:16 +00:00
main.cpp Network chat: update includes 2023-05-31 12:55:54 +02:00
network-chat.pro Network chat: Use QStringBuilder 2023-05-31 12:55:56 +02:00
peermanager.cpp Network-chat: Fix remote peer making multiple connections 2023-07-17 16:49:16 +00:00
peermanager.h Network-chat: Fix remote peer making multiple connections 2023-07-17 16:49:16 +00:00
server.cpp Network chat: update includes 2023-05-31 12:55:54 +02:00
server.h Network chat: make ctors explicit 2023-05-31 12:55:55 +02:00