QMqttConnectionProperties Class
QMqttConnectionProperties 클래스는 QMqttClient 가 QMqttClient::connectToHost()를 호출할 때 서버로 전달할 수 있는 구성 옵션을 나타냅니다. 더 보기...
| 헤더: | #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이며, 이는 네트워크 연결이 종료되면 세션이 닫힌다는 것을 의미합니다. 값이 quint32의 최대값으로 지정된 경우, 세션은 만료되지 않습니다.
sessionExpiryInterval()도 참조하십시오 .
void QMqttConnectionProperties::setUserProperties(const QMqttUserProperties &properties)
properties 에 대한 연결의 사용자 속성을 설정합니다.
기본값은 사용자 정보를 전혀 전송하지 않는 것입니다.
userProperties()도 참조하십시오 .
QMqttUserProperties QMqttConnectionProperties::userProperties() const
연결에 대한 사용자 속성을 반환합니다.
setUserProperties()도 참조하십시오 .
© 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.