QMqttConnectionProperties#
The QMqttConnectionProperties
class represents configuration options a QMqttClient
can pass to the server when invoking connectToHost()
. More…
Inherited by: QMqttServerConnectionProperties
Synopsis#
Functions#
def
authenticationData
()def
authenticationMethod
()def
maximumPacketSize
()def
maximumReceive
()def
maximumTopicAlias
()def
requestProblemInformation
()def
requestResponseInformation
()def
sessionExpiryInterval
()def
setAuthenticationData
(authData)def
setAuthenticationMethod
(authMethod)def
setMaximumPacketSize
(packetSize)def
setMaximumReceive
(maximumReceive)def
setMaximumTopicAlias
(alias)def
setRequestProblemInformation
(problem)def
setRequestResponseInformation
(response)def
setSessionExpiryInterval
(expiry)def
setUserProperties
(properties)def
userProperties
()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description#
Note
Connection properties are part of the MQTT 5.0 specification and cannot be used when connecting with a lower protocol level. See ProtocolVersion
for more information.
- class PySide6.QtMqtt.QMqttConnectionProperties#
PySide6.QtMqtt.QMqttConnectionProperties(arg__1)
- Parameters:
- PySide6.QtMqtt.QMqttConnectionProperties.authenticationData()#
- Return type:
Returns the authentication data.
See also
- PySide6.QtMqtt.QMqttConnectionProperties.authenticationMethod()#
- Return type:
str
Returns the authentication method.
See also
- PySide6.QtMqtt.QMqttConnectionProperties.maximumPacketSize()#
- Return type:
int
Returns the maximum packet size the client can receive.
See also
- PySide6.QtMqtt.QMqttConnectionProperties.maximumReceive()#
- Return type:
quint16
Returns the maximum amount of QoS 1 and QoS 2 publications that the client (when obtained from connectionProperties()
) or the server (when obtained from serverConnectionProperties()
) is willing to process concurrently for this session.
See also
- PySide6.QtMqtt.QMqttConnectionProperties.maximumTopicAlias()#
- Return type:
quint16
Returns the maximum topic alias ID the client can use.
See also
- PySide6.QtMqtt.QMqttConnectionProperties.requestProblemInformation()#
- Return type:
bool
Returns whether the client should receive problem information.
See also
- PySide6.QtMqtt.QMqttConnectionProperties.requestResponseInformation()#
- Return type:
bool
Returns whether the client should receive response information.
See also
- PySide6.QtMqtt.QMqttConnectionProperties.sessionExpiryInterval()#
- Return type:
int
Returns the session expiry interval.
See also
- PySide6.QtMqtt.QMqttConnectionProperties.setAuthenticationData(authData)#
- Parameters:
authData –
PySide6.QtCore.QByteArray
Sets the authentication data to authData
.
Authentication data can only be used if an authentication method has been specified.
- PySide6.QtMqtt.QMqttConnectionProperties.setAuthenticationMethod(authMethod)#
- Parameters:
authMethod – str
Sets the authentication method to authMethod
.
- PySide6.QtMqtt.QMqttConnectionProperties.setMaximumPacketSize(packetSize)#
- Parameters:
packetSize – int
Sets the maximum packet size to packetSize
. The maximum packet size specifies the maximum size one packet can contain. This includes the packet header and its properties.
If no maximum packet size is specified, no limit is imposed beyond the limitations of the protocol itself.
See also
- PySide6.QtMqtt.QMqttConnectionProperties.setMaximumReceive(maximumReceive)#
- Parameters:
maximumReceive –
quint16
Sets the maximum amount of QoS 1 and QoS 2 publications that the client is willing to process concurrently for this session to maximumReceive
.
A maximum receive value of 0 is not allowed.
See also
- PySide6.QtMqtt.QMqttConnectionProperties.setMaximumTopicAlias(alias)#
- Parameters:
alias –
quint16
Sets the maximum topic alias to alias
. The maximum topic alias specifies the highest value that the client will accept from the server. The client uses this value to limit the number of topic aliases it is willing to hold for the connection.
The default value is 0. 0 indicates that the client does not accept any topic aliases on this connection.
See also
- PySide6.QtMqtt.QMqttConnectionProperties.setRequestProblemInformation(problem)#
- Parameters:
problem – bool
Sets the request problem information to problem
. A client uses this to request the server to return additional information in case of failure. Types of failure include connection and message management on the server side.
The default value is false
, which indicates that the client must not receive any problem information for anything but connection management. The server still may send problem information for connection handling. If the value is true
, the server may return problem information.
Problem information is available in user properties or reason strings of the property classes.
See also
- PySide6.QtMqtt.QMqttConnectionProperties.setRequestResponseInformation(response)#
- Parameters:
response – bool
Sets the request response information to response
. A client uses this to request the server to return response information after the connection request has been handled.
The default value is false
, which indicates that the client must not return any response information. If the value is true
, the server may return response information, but is not enforced to do so.
See also
- PySide6.QtMqtt.QMqttConnectionProperties.setSessionExpiryInterval(expiry)#
- Parameters:
expiry – int
Sets the session expiry interval to expiry
. The session expiry interval specifies the number of seconds a server holds information on the client state after a connection has been closed.
The default value is 0, which specifies that the session is closed when the network connection ends. If the value is specified as maximum of quint32, then the session does not expire.
See also
- PySide6.QtMqtt.QMqttConnectionProperties.setUserProperties(properties)#
- Parameters:
properties –
QMqttUserProperties
Sets the user properties of the connection to properties
.
The default value is to not send any user information.
See also
- PySide6.QtMqtt.QMqttConnectionProperties.userProperties()#
- Return type:
QMqttUserProperties
Returns the user properties for the connection.
See also