Having the server perform 2 syscalls per TCP audio packet is extreme - turning this
off led to 30% lower CPU utilization in a test with 200 music-playing bots.
Switching to TCP_NODELAY for all packets is probably a win as well - TCP is only
typically used for control packets like users joining and leaving channels, of
which there are few. (As alluded to above, TCP is also sometimes used for audio,
in which case it should be in TCP_NODELAY mode anyway).
This commit adds all the missing includes when the PCH header is not used.
Also, some includes are reordered and/or made consistent (e.g. "#include <QtEndian>" -> "#include <QtCore/QtEndian>").
According to Qt's documentation the PCH header doesn't need to be included.
From https://doc.qt.io/qt-5/qmake-precompiledheaders.html:
"To make your project use precompiled headers, you only need to define the PRECOMPILED_HEADER variable in your project file."
"qmake will handle the rest, to ensure the creation and use of the precompiled header file. You do not need to include the precompiled header file in HEADERS, as qmake will do this if the configuration supports precompiled headers."
As mentioned in #1811 we previously only output the
encryption algorithm as well as the width of the key
in the server information dialog.
This patch adds the encryption protocol, authentication
method and key-exchange method to the dialog. The
wording is similar to what Chrome uses to make it easier
to google.
As the option to retrieve the actual encryption protocol
for the connection was only added in Qt 5.4 we output
"TLS" in clients built with earlier versions as we cannot
know which version we are actually using.
Due to limitations in the information Qt provides us the
current output is far from ideal. To fix that additional
work is requored which will be done in a followup patch.
* Move method comments to the actual methods.
* Remove obsolete comment
that came in in aad4de178b
The signal/slot `activated` is no longer used since a long time ago.
Sometimes Qt doesn't emit a disconnected signal for closed
sockets (or it happens before we're listening to those).
Manually emitting the signal in our disconnect function if the
socket is not connected fixes the problem.