QtCraft API C++ classes QML types Handbook

QcTlsListener Class

A TCP listener for TLS (decision E-872): every accepted connection is a QSslSocket set up as the TLS server with the credentials (TLS 1.3 only, no client certificate). More...

Header: #include <network/tls/QcTlsListener.h>
Inherits: QTcpServer

Static Public Members

void startEncryption(QTcpSocket *socket)

Reimplemented Protected Functions

virtual void incomingConnection(qintptr descriptor) override

Detailed Description

The handshake begins only with startEncryption(), so the connection limits see a connection before it costs a handshake. nextPendingConnection() hands out these sockets. Without TLS (QcTlsBackend::enabled) it is a plain QTcpServer.

Member Function Documentation

[override virtual protected] void QcTlsListener::incomingConnection(qintptr descriptor)

Reimplements: QTcpServer::incomingConnection(qintptr socketDescriptor).

[static] void QcTlsListener::startEncryption(QTcpSocket *socket)

Starts the server side of the handshake on socket, one of nextPendingConnection(). Data written before it ends waits and goes out encrypted.