QMqttConnectionProperties Class
QMqttConnectionProperties 클래스는 QMqttClient::connectToHost()을 호출할 때 QMqttClient 가 서버에 전달할 수 있는 구성 옵션을 나타냅니다. 더 보기...
헤더: | #include <QMqttConnectionProperties> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Mqtt) target_link_libraries(mytarget PRIVATE Qt6::Mqtt) |
qmake: | QT += mqtt |
상속 대상: |
공용 함수
QByteArray | authenticationData() const |
QString | authenticationMethod() const |
quint32 | maximumPacketSize() const |
quint16 | maximumReceive() const |
quint16 | maximumTopicAlias() const |
bool | requestProblemInformation() const |
bool | requestResponseInformation() const |
quint32 | sessionExpiryInterval() const |
void | setAuthenticationData(const QByteArray &authData) |
void | setAuthenticationMethod(const QString &authMethod) |
void | setMaximumPacketSize(quint32 packetSize) |
void | setMaximumReceive(quint16 maximumReceive) |
void | setMaximumTopicAlias(quint16 alias) |
void | setRequestProblemInformation(bool problem) |
void | setRequestResponseInformation(bool response) |
void | setSessionExpiryInterval(quint32 expiry) |
void | setUserProperties(const QMqttUserProperties &properties) |
QMqttUserProperties | userProperties() const |
상세 설명
참고: 연결 속성은 MQTT 5.0 사양의 일부이며 더 낮은 프로토콜 레벨로 연결할 때는 사용할 수 없습니다. 자세한 내용은 QMqttClient::ProtocolVersion 을 참조하세요.
멤버 함수 문서
QByteArray QMqttConnectionProperties::authenticationData() const
인증 데이터를 반환합니다.
setAuthenticationData()도 참조하세요 .
QString QMqttConnectionProperties::authenticationMethod() const
인증 방법을 반환합니다.
setAuthenticationMethod()도 참조하세요 .
quint32 QMqttConnectionProperties::maximumPacketSize() const
클라이언트가 수신할 수 있는 최대 패킷 크기를 반환합니다.
setMaximumPacketSize()도 참조하세요 .
quint16 QMqttConnectionProperties::maximumReceive() const
클라이언트( QMqttClient::connectionProperties()에서 얻은 경우) 또는 서버( QMqttClient::serverConnectionProperties()에서 얻은 경우)가 이 세션에 대해 동시에 처리할 수 있는 최대 QoS 1 및 QoS 2 발행물 양을 반환합니다.
setMaximumReceive()도 참조하세요 .
quint16 QMqttConnectionProperties::maximumTopicAlias() const
클라이언트가 사용할 수 있는 최대 토픽 별칭 ID를 반환합니다.
setMaximumTopicAlias()도 참조하세요 .
bool QMqttConnectionProperties::requestProblemInformation() const
클라이언트가 문제 정보를 수신해야 하는지 여부를 반환합니다.
setRequestProblemInformation()도 참조하세요 .
bool QMqttConnectionProperties::requestResponseInformation() const
클라이언트가 응답 정보를 수신해야 하는지 여부를 반환합니다.
setRequestResponseInformation()도 참조하세요 .
quint32 QMqttConnectionProperties::sessionExpiryInterval() const
세션 만료 간격을 반환합니다.
setSessionExpiryInterval()도 참조하세요 .
void QMqttConnectionProperties::setAuthenticationData(const QByteArray &authData)
인증 데이터를 authData 로 설정합니다.
인증 데이터는 인증 방법을 지정한 경우에만 사용할 수 있습니다.
authenticationData() 및 authenticationMethod()도 참조하세요 .
void QMqttConnectionProperties::setAuthenticationMethod(const QString &authMethod)
인증 방법을 authMethod 로 설정합니다.
authenticationMethod() 및 authenticationData()도 참조하세요 .
void QMqttConnectionProperties::setMaximumPacketSize(quint32 packetSize)
최대 패킷 크기를 packetSize 로 설정합니다. 최대 패킷 크기는 한 패킷에 포함할 수 있는 최대 크기를 지정합니다. 여기에는 패킷 헤더와 해당 속성이 포함됩니다.
최대 패킷 크기를 지정하지 않으면 프로토콜 자체의 제한을 넘어서는 제한이 적용되지 않습니다.
maximumPacketSize()도 참조하세요 .
void QMqttConnectionProperties::setMaximumReceive(quint16 maximumReceive)
클라이언트가 이 세션에 대해 동시에 처리할 수 있는 QoS 1 및 QoS 2 게시의 최대 양을 maximumReceive 으로 설정합니다.
최대 수신 값 0은 허용되지 않습니다.
maximumReceive()도 참조하세요 .
void QMqttConnectionProperties::setMaximumTopicAlias(quint16 alias)
최대 토픽 별칭을 alias 으로 설정합니다. 최대 토픽 별칭은 클라이언트가 서버에서 허용할 수 있는 최고 값을 지정합니다. 클라이언트는 이 값을 사용하여 연결에 대해 보유할 수 있는 토픽 별칭의 수를 제한합니다.
기본값은 0입니다. 0은 클라이언트가 이 연결에서 어떤 토픽 별칭도 허용하지 않음을 나타냅니다.
maximumTopicAlias()도 참조하세요 .
void QMqttConnectionProperties::setRequestProblemInformation(bool problem)
요청 문제 정보를 problem 로 설정합니다. 클라이언트는 이를 사용하여 장애 발생 시 서버에 추가 정보를 반환하도록 요청합니다. 실패 유형에는 서버 측의 연결 및 메시지 관리가 포함됩니다.
기본값은 false
으로, 클라이언트가 연결 관리 외에는 어떤 문제 정보도 받지 않아야 함을 나타냅니다. 서버는 여전히 연결 처리를 위해 문제 정보를 보낼 수 있습니다. 값이 true
인 경우 서버는 문제 정보를 반환할 수 있습니다.
문제 정보는 사용자 속성 또는 속성 클래스의 이유 문자열에서 사용할 수 있습니다.
requestProblemInformation()도 참조하세요 .
void QMqttConnectionProperties::setRequestResponseInformation(bool response)
요청 응답 정보를 response 로 설정합니다. 클라이언트는 이를 사용하여 연결 요청이 처리된 후 서버에 응답 정보를 반환하도록 요청합니다.
기본값은 false
이며, 이는 클라이언트가 응답 정보를 반환하지 않아야 함을 나타냅니다. 값이 true
인 경우 서버는 응답 정보를 반환할 수 있지만 강제로 반환하지는 않습니다.
requestResponseInformation()도 참조하세요 .
void QMqttConnectionProperties::setSessionExpiryInterval(quint32 expiry)
세션 만료 간격을 expiry 으로 설정합니다. 세션 만료 간격은 연결이 종료된 후 서버가 클라이언트 상태에 대한 정보를 보관하는 시간(초)을 지정합니다.
기본값은 0으로, 네트워크 연결이 종료되면 세션이 닫히도록 지정합니다. 값을 최대값인 퀸트32로 지정하면 세션이 만료되지 않습니다.
sessionExpiryInterval()도 참조하세요 .
void QMqttConnectionProperties::setUserProperties(const QMqttUserProperties &properties)
연결의 사용자 속성을 properties 로 설정합니다.
기본값은 사용자 정보를 보내지 않는 것입니다.
userProperties()도 참조하세요 .
QMqttUserProperties QMqttConnectionProperties::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.