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()
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 オブジェクトのデータをこのレコードオブジェクトに代入し、その参照を返す。

© 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.