QDnsServiceRecord Class
QDnsServiceRecord 클래스는 DNS SRV 레코드에 대한 정보를 저장합니다. 더 보기...
| 헤더: | #include <QDnsServiceRecord> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Network) target_link_libraries(mytarget PRIVATE Qt6::Network) |
| qmake: | QT += network |
- 상속된 멤버를 포함한 모든 멤버 목록
- QDnsServiceRecord는 네트워크 프로그래밍 API 및 암시적 공유 클래스의 일부입니다.
공개 함수
| QDnsServiceRecord() | |
| QDnsServiceRecord(const QDnsServiceRecord &other) | |
| ~QDnsServiceRecord() | |
| QString | name() const |
| quint16 | port() const |
| quint16 | priority() const |
| void | swap(QDnsServiceRecord &other) |
| QString | target() const |
| quint32 | timeToLive() const |
| quint16 | weight() const |
| QDnsServiceRecord & | operator=(const QDnsServiceRecord &other) |
상세 설명
서비스 조회를 수행할 때, 0개 이상의 레코드가 반환됩니다. 각 레코드는 QDnsServiceRecord 인스턴스로 표현됩니다.
필드의 의미는 RFC 2782에 정의되어 있습니다.
QDnsLookup도 참조하십시오 .
멤버 함수 설명
QDnsServiceRecord::QDnsServiceRecord()
빈 서비스 레코드 객체를 생성합니다.
QDnsServiceRecord::QDnsServiceRecord(const QDnsServiceRecord &other)
other 의 복사본을 생성합니다.
[noexcept] QDnsServiceRecord::~QDnsServiceRecord()
서비스 기록을 삭제합니다.
QString QDnsServiceRecord::name() const
이 레코드의 이름을 반환합니다.
quint16 QDnsServiceRecord::port() const
이 서비스 레코드에 해당하는 대상 호스트의 포트를 반환합니다.
quint16 QDnsServiceRecord::priority() const
이 서비스 레코드의 우선순위를 반환합니다.
클라이언트는 우선순위 번호가 가장 낮은 것으로 대상 호스트에 접속을 시도해야 합니다.
[noexcept] void QDnsServiceRecord::swap(QDnsServiceRecord &other)
이 서비스 레코드 인스턴스를 other 로 교체합니다. 이 작업은 매우 빠르게 수행되며 절대 실패하지 않습니다.
QString QDnsServiceRecord::target() const
이 서비스 레코드의 대상 호스트에 대한 도메인 이름을 반환합니다.
quint32 QDnsServiceRecord::timeToLive() const
이 레코드의 유효 기간을 초 단위로 반환합니다.
quint16 QDnsServiceRecord::weight() const
이 서비스 레코드의 가중치를 반환합니다.
'가중치' 필드는 동일한 우선순위를 가진 항목들에 대한 상대적 가중치를 지정합니다. 가중치가 높은 항목일수록 선택될 확률이 높아야 합니다.
QDnsServiceRecord &QDnsServiceRecord::operator=(const QDnsServiceRecord &other)
other 객체의 데이터를 이 레코드 객체에 할당하고, 해당 객체에 대한 참조를 반환합니다.
© 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.