QTcpSocket Class
Die Klasse QTcpSocket stellt einen TCP-Socket zur Verfügung. Mehr...
Header: | #include <QTcpSocket> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Network) target_link_libraries(mytarget PRIVATE Qt6::Network) |
qmake: | QT += network |
Vererbt: | QAbstractSocket |
Vererbt von: |
- Liste aller Mitglieder, einschließlich geerbter Mitglieder
- QTcpSocket ist Teil der Network Programming API.
Hinweis: Alle Funktionen in dieser Klasse sind reentrant.
Öffentliche Funktionen
QTcpSocket(QObject *parent = nullptr) | |
virtual | ~QTcpSocket() |
Detaillierte Beschreibung
TCP (Transmission Control Protocol) ist ein zuverlässiges, streaming-orientiertes, verbindungsorientiertes Transportprotokoll. Es ist besonders gut für die kontinuierliche Übertragung von Daten geeignet.
QTcpSocket ist eine komfortable Unterklasse von QAbstractSocket, mit der Sie eine TCP-Verbindung aufbauen und Datenströme übertragen können. Einzelheiten finden Sie in der Dokumentation QAbstractSocket.
Hinweis: TCP-Sockets können nicht im QIODeviceBase::Unbuffered Modus geöffnet werden.
Siehe auch QTcpServer, QUdpSocket, QNetworkAccessManager, Fortune Server, Fortune Client, Threaded Fortune Server, Blocking Fortune Client, und Torrent Example.
Dokumentation der Mitgliedsfunktionen
[explicit]
QTcpSocket::QTcpSocket(QObject *parent = nullptr)
Erzeugt ein QTcpSocket-Objekt im Zustand UnconnectedState
.
parent wird an den QObject Konstruktor weitergegeben.
Siehe auch socketType().
[virtual noexcept]
QTcpSocket::~QTcpSocket()
Zerstört den Socket und schließt die Verbindung, falls erforderlich.
Siehe auch close().
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.