QtCraft API C++ classes QML types Handbook

qc_network

TCP and TLS transport of the protocol frames. More...

Namespaces

QcDer

Few DER (ASN.1) encodings a self-signed certificate needs (decision E-872; ITU-T X.690): the structure only, the key and its signature come from QcTlsKey

QcSocketErrors

Translated texts for socket errors (context "QcNetwork", decision E-261): Qt's own error strings are English and name system calls; players see what went wrong and what to check

QcTlsBackend

Which TLS the program speaks (decision E-872): Qt's "openssl" backend on every platform, with the OpenSSL the game ships (scripts/build-openssl.sh)

QcTlsFingerprint

Fingerprint clients pin: SHA-256 of the certificate (DER), as lowercase hex

Classes

QcConnectionLimits

Bounds of new connections per network address (decision E-254), kept by the server's QcConnectionLimiter: a token bucket per address against connection floods, and a cap of open connections per address and in all

QcJoinFailure

Why joining a server failed (decision E-964): the step that failed as a kind, the address and the IP addresses tried, a translated reason and a hint what to check

QcNetworkConfig

Settings of the listener of a network game (decisions E-251, E-254, E-872)

QcServerAddress

A server address as a player types it (decision E-251): "host", "host:port", "1.2.3.4:port", "[v6]:port" or a bare IPv6 address; the port defaults to defaultPort

QcTcpConnector

Opens a TLS connection to a server (name lookup, IPv4 or IPv6; decisions E-251, E-872, E-964) and hands it over as a transport once the handshake is done

QcTcpGoodbye

Ends a TCP connection so that the peer reads everything sent before (decision E-904)

QcTcpTransport

A transport over TCP (decision E-251): frames with a length prefix (QcFrameReader), a keep-alive frame when nothing was sent for a while, a timeout when nothing arrives, and a bound for the bytes waiting to be sent, beyond which a peer counts as too slow and is cut off

QcTcpTransport::Limits

Bounds of a transport; the defaults suit a client's link to its server

QcTlsCredentials

Certificate and private key a server shows in the TLS handshake (decision E-872): an EC key on P-256 from OpenSSL (QcTlsKey) and a self-signed certificate for it, whose structure this program writes in DER (QcDer), made once per installation and kept in its data folder next to server.json

QcTlsKey

Key of a server's certificate (decision E-872): an EC key on the curve P-256 (prime256v1), made and used by OpenSSL's libcrypto (EVP_PKEY_Q_keygen, EVP_DigestSign with SHA-256); the program implements no key generation or signatures of its own

QcTlsListener

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)

Detailed Description

Uses qc_common.