QTcpSocket Class
QTcpSocket クラスは、TCP ソケットを提供します。詳細...
ヘッダ | #include <QTcpSocket> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Network) target_link_libraries(mytarget PRIVATE Qt6::Network) |
qmake: | QT += network |
を継承する: | QAbstractSocket |
によって継承される: |
- 継承されたメンバを含む、すべてのメンバのリスト
- QTcpSocketは、Network Programming APIに含まれています。
注意:このクラスのすべての関数はリエントラントです。
パブリック関数
QTcpSocket(QObject *parent = nullptr) | |
virtual | ~QTcpSocket() |
詳細説明
TCP(Transmission Control Protocol)は、信頼性が高く、ストリーム指向で、コネクション指向のトランスポート・プロトコルです。特にデータの連続送信に適しています。
QTcpSocket はQAbstractSocket の便利なサブクラスで、TCP 接続を確立し、データのストリームを転送することができます。詳細については、QAbstractSocket のドキュメントを参照してください。
注意: QIODeviceBase::Unbuffered モードでは、TCP ソケットを開くことはできません。
QTcpServer,QUdpSocket,QNetworkAccessManager,Fortune Server,Fortune Client,Threaded Fortune Server,Blocking Fortune Client,Torrent Exampleも参照してください 。
メンバー関数ドキュメント
[explicit]
QTcpSocket::QTcpSocket(QObject *parent = nullptr)
状態UnconnectedState
のQTcpSocketオブジェクトを作成する。
parent は コンストラクタに渡されます。QObject
socketType()も参照してください 。
[virtual noexcept]
QTcpSocket::~QTcpSocket()
ソケットを破棄し、必要に応じて接続を閉じる。
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.