QTcpSocket Class
La classe QTcpSocket fornisce un socket TCP. Maggiori informazioni...
| Intestazione: | #include <QTcpSocket> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Network) target_link_libraries(mytarget PRIVATE Qt6::Network) |
| qmake: | QT += network |
| Eredita da: | QAbstractSocket |
| Ereditato da: |
- Elenco di tutti i membri, compresi quelli ereditati
- QTcpSocket fa parte dell 'API di programmazione di rete.
Nota: Tutte le funzioni di questa classe sono rientranti.
Funzioni pubbliche
| QTcpSocket(QObject *parent = nullptr) | |
| virtual | ~QTcpSocket() |
Descrizione dettagliata
Il TCP (Transmission Control Protocol) è un protocollo di trasporto affidabile, orientato ai flussi e alle connessioni. È particolarmente adatto alla trasmissione continua di dati.
QTcpSocket è una sottoclasse di utilità di QAbstractSocket che consente di stabilire una connessione TCP e trasferire flussi di dati. Per ulteriori dettagli, consultare la documentazione relativa a QAbstractSocket.
Nota: i socketTCP non possono essere aperti in modalità QIODeviceBase::Unbuffered.
Vedi anche QTcpServer, QUdpSocket, QNetworkAccessManager, Fortune Server, Fortune Client, Threaded Fortune Server, Blocking Fortune Client ed Esempio Torrent.
Documentazione sulle funzioni membro
[explicit] QTcpSocket::QTcpSocket(QObject *parent = nullptr)
Crea un oggetto QTcpSocket nello stato “ UnconnectedState ”.
parent viene passato al costruttore QObject.
Vedi anche socketType().
[virtual noexcept] QTcpSocket::~QTcpSocket()
Elimina il socket, chiudendo la connessione se necessario.
Vedi anche 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.