QTcpSocket Class
La clase QTcpSocket proporciona un socket TCP. Más...
| Cabecera: | #include <QTcpSocket> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Network)target_link_libraries(mytarget PRIVATE Qt6::Network) |
| qmake: | QT += network |
| Hereda: | QAbstractSocket |
| Heredado por: |
- Lista de todos los miembros, incluyendo los heredados
- QTcpSocket es parte de la API de programación de redes.
Nota: Todas las funciones de esta clase son reentrantes.
Funciones Públicas
| QTcpSocket(QObject *parent = nullptr) | |
| virtual | ~QTcpSocket() |
Descripción Detallada
TCP (Transmission Control Protocol) es un protocolo de transporte fiable, orientado al flujo y a la conexión. Es especialmente adecuado para la transmisión continua de datos.
QTcpSocket es una subclase de QAbstractSocket que permite establecer una conexión TCP y transferir flujos de datos. Para más detalles, consulte la documentación de QAbstractSocket.
Nota: Los sockets TCP no pueden abrirse en modo QIODeviceBase::Unbuffered.
Vea también QTcpServer, QUdpSocket, QNetworkAccessManager, Fortune Server, Fortune Client, Threaded Fortune Server, Blocking Fortune Client, y Torrent Example.
Documentación de funciones miembro
[explicit] QTcpSocket::QTcpSocket(QObject *parent = nullptr)
Crea un objeto QTcpSocket en el estado UnconnectedState.
parent se pasa al constructor QObject.
Ver también socketType().
[virtual noexcept] QTcpSocket::~QTcpSocket()
Destruye el socket, cerrando la conexión si es necesario.
Véase también close().
© 2026 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.