QDnsMailExchangeRecord Class

QDnsMailExchangeRecord 类存储有关 DNS MX 记录的信息。更多

头文件: #include <QDnsMailExchangeRecord>
CMake: find_package(Qt6 REQUIRED COMPONENTS Network)
target_link_libraries(mytarget PRIVATE Qt6::Network)
qmake: QT += network

公共函数

QDnsMailExchangeRecord()
QDnsMailExchangeRecord(const QDnsMailExchangeRecord &other)
~QDnsMailExchangeRecord()
QString exchange() const
QString name() const
quint16 preference() const
void swap(QDnsMailExchangeRecord &other)
quint32 timeToLive() const
QDnsMailExchangeRecord &operator=(const QDnsMailExchangeRecord &other)

详细说明

在服务上执行查询时,将返回零条或多条记录。每条记录由一个 QDnsMailExchangeRecord 实例表示。

字段的含义已在RFC 1035 中定义。

另请参阅 QDnsLookup

成员函数文档

QDnsMailExchangeRecord::QDnsMailExchangeRecord()

构造一个空的邮件交换记录对象。

QDnsMailExchangeRecord::QDnsMailExchangeRecord(const QDnsMailExchangeRecord &other)

构造other 的副本。

[noexcept] QDnsMailExchangeRecord::~QDnsMailExchangeRecord()

销毁邮件交换记录。

QString QDnsMailExchangeRecord::exchange() const

返回此记录的邮件交换中心域名。

QString QDnsMailExchangeRecord::name() const

返回此记录的名称。

quint16 QDnsMailExchangeRecord::preference() const

返回此记录的首选项。

[noexcept] void QDnsMailExchangeRecord::swap(QDnsMailExchangeRecord &other)

将此邮件交换记录与other 互换。该操作速度非常快,从未出现过故障。

quint32 QDnsMailExchangeRecord::timeToLive() const

返回该记录的有效期(以秒为单位)。

QDnsMailExchangeRecord &QDnsMailExchangeRecord::operator=(const QDnsMailExchangeRecord &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.