QMqttSubscriptionProperties Class

QMqttSubscriptionProperties 클래스는 토픽 필터를 구독할 때 QMqttClient 서버에 전달할 수 있는 구성 옵션을 나타냅니다. 더 보기...

헤더: #include <QMqttSubscriptionProperties>
CMake: find_package(Qt6 REQUIRED COMPONENTS Mqtt)
target_link_libraries(mytarget PRIVATE Qt6::Mqtt)
qmake: QT += mqtt

공용 함수

(since 6.4) bool noLocal() const
(since 6.4) void setNoLocal(bool noloc)
void setSubscriptionIdentifier(quint32 id)
void setUserProperties(const QMqttUserProperties &user)
quint32 subscriptionIdentifier() const
QMqttUserProperties userProperties() const

상세 설명

참고: 구독 속성은 MQTT 5.0 사양의 일부이며 더 낮은 프로토콜 레벨로 연결할 때는 사용할 수 없습니다. 자세한 내용은 QMqttClient::ProtocolVersion 을 참조하세요.

멤버 함수 문서

[since 6.4] bool QMqttSubscriptionProperties::noLocal() const

구독이 동일한 주제에 대한 로컬 메시지를 수신하지 않아야 할 경우 true를 반환합니다.

이 함수는 Qt 6.4에 도입되었습니다.

setNoLocal()도 참조하세요 .

[since 6.4] void QMqttSubscriptionProperties::setNoLocal(bool noloc)

로컬 메시지를 수신하지 않도록 구독 옵션을 설정합니다. 클라이언트가 기존 로컬 구독과 동일한 주제의 메시지를 게시하면 서버는 기본적으로 해당 메시지를 클라이언트로 다시 보냅니다. noloc 을 true로 설정하면 브로커는 동일한 클라이언트가 게시한 메시지를 보내지 않습니다.

이 기능은 Qt 6.4에 도입되었습니다.

noLocal()도 참조하세요 .

void QMqttSubscriptionProperties::setSubscriptionIdentifier(quint32 id)

구독 식별자를 id 로 설정합니다.

subscriptionIdentifier()도 참조하세요 .

void QMqttSubscriptionProperties::setUserProperties(const QMqttUserProperties &user)

사용자 속성을 user 로 설정합니다.

userProperties()도 참조하세요 .

quint32 QMqttSubscriptionProperties::subscriptionIdentifier() const

이 구독을 설명하는 데 사용된 구독 식별자를 반환합니다.

setSubscriptionIdentifier()도 참조하세요 .

QMqttUserProperties QMqttSubscriptionProperties::userProperties() const

사용자가 지정한 속성을 반환합니다.

setUserProperties()도 참조하세요 .

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