Implements an encrypted, secure TCP server over TLS. More…
New in version 6.4.
alertReceived(socket, level, type, description)
alertSent(socket, level, type, description)
Class to use in place of
QTcpServer to implement TCP server using Transport Layer Security (TLS).
To configure the secure handshake settings, use the applicable setter functions on a
QSslConfiguration object, and then use it as a argument to the
setSslConfiguration() function. All following incoming connections handled will use these settings.
Connect to the signals of this class to respond to the incoming connection attempts. They are the same as the signals on
QSslSocket , but also passes a pointer to the socket in question.
When responding to the
pendingConnectionAvailable() signal, use the
nextPendingConnection() function to fetch the next incoming connection and take it out of the pending connection queue. The
QSslSocket is a child of the
QSslServer and will be deleted when the
QSslServer is deleted. It is still a good a good idea to destroy the object explicitly when you are done with it, to avoid wasting memory.
Constructs a new
QSslServer with the given
- PySide6.QtNetwork.QSslServer.alertReceived(socket, level, type, description)#
- PySide6.QtNetwork.QSslServer.alertSent(socket, level, type, description)#
- PySide6.QtNetwork.QSslServer.errorOccurred(socket, error)#
- PySide6.QtNetwork.QSslServer.handshakeInterruptedOnError(socket, error)#
- Return type
Returns the currently configured handshake timeout.
- PySide6.QtNetwork.QSslServer.peerVerifyError(socket, error)#
timeout – int
timeout to use for all incoming handshakes, in milliseconds.
This is relevant in the scenario where a client, whether malicious or accidental, connects to the server but makes no attempt at communicating or initiating a handshake.
QSslServer will then automatically end the connection after
timeout milliseconds have elapsed.
By default the timeout is 5000 milliseconds (5 seconds).
The underlying TLS framework may have their own timeout logic now or in the future, this function does not affect that.
timeout passed to this function will only apply to new connections. If a client is already connected it will use the timeout which was set when it connected.
sslConfiguration to use for all following incoming connections.
This must be called before
listen() to ensure that the desired configuration was in use during all handshakes.
Returns the current ssl configuration.
- PySide6.QtNetwork.QSslServer.sslErrors(socket, errors)#