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(전송 제어 프로토콜)는 안정적이고 스트림 지향적이며 연결 지향적인 전송 프로토콜입니다. 특히 데이터의 연속 전송에 적합합니다.
QTcpSocket은 TCP 연결을 설정하고 데이터 스트림을 전송할 수 있는 QAbstractSocket 의 편리한 서브클래스입니다. 자세한 내용은 QAbstractSocket 문서를 참조하세요.
참고: QIODeviceBase::Unbuffered 모드에서는 TCP 소켓을 열 수 없습니다.
QTcpServer, QUdpSocket, QNetworkAccessManager, 포춘 서버, 포춘 클라이언트, 스레드 포춘 서버, 포춘 클라이언트 차단 및 토렌트 예시도참조하세요 .
멤버 기능 문서
[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.