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 は、ネットワークプログラミング 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()も参照してください 。
© 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.