QMqttServerConnectionProperties#

The QMqttServerConnectionProperties class represents configuration options of a server a QMqttClient is connected to. More

Inheritance diagram of PySide6.QtMqtt.QMqttServerConnectionProperties

Synopsis#

Functions#

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#

When a connection has been established the server might send additional details about the connection properties. Use availableProperties() to identify properties set by the server. If a property is not set by the server, default values are assumed and can be obtained by invoking access functions of this instance.

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.QMqttServerConnectionProperties#

PySide6.QtMqtt.QMqttServerConnectionProperties(arg__1)

Parameters:

arg__1PySide6.QtMqtt.QMqttServerConnectionProperties

PySide6.QtMqtt.QMqttServerConnectionProperties.ServerPropertyDetail#

(inherits enum.Flag) This enum type specifies the available properties set by the server or the client after establishing a connection.

Constant

Description

QMqttServerConnectionProperties.None

No property has been specified.

QMqttServerConnectionProperties.SessionExpiryInterval

The number of seconds the server keeps the session after a disconnect.

QMqttServerConnectionProperties.MaximumReceive

The maximum number of QoS 1 and 2 message the server is capable of managing concurrently.

QMqttServerConnectionProperties.MaximumQoS

The maximum QoS level the server can understand.

QMqttServerConnectionProperties.RetainAvailable

Specifies whether retained messages are supported.

QMqttServerConnectionProperties.MaximumPacketSize

Specifies the maximum packet size including the message header and properties.

QMqttServerConnectionProperties.AssignedClientId

Specifies whether the server assigned a client identifier.

QMqttServerConnectionProperties.MaximumTopicAlias

Specifies the maximum amount of topic aliases.

QMqttServerConnectionProperties.ReasonString

Specifies a string providing more details on connection state.

QMqttServerConnectionProperties.UserProperty

Specifies additional user properties.

QMqttServerConnectionProperties.WildCardSupported

Specifies whether the server supports wildcard subscriptions.

QMqttServerConnectionProperties.SubscriptionIdentifierSupport

Specifies whether the server supports subscription identifiers.

QMqttServerConnectionProperties.SharedSubscriptionSupport

Specifies whether the server supports shared subscriptions.

QMqttServerConnectionProperties.ServerKeepAlive

Specifies the number of seconds the server expects a keep alive packet from the client.

QMqttServerConnectionProperties.ResponseInformation

Specifies the response information.

QMqttServerConnectionProperties.ServerReference

Specifies an alternative server address for the client to connect to.

QMqttServerConnectionProperties.AuthenticationMethod

Specifies the authentication method.

QMqttServerConnectionProperties.AuthenticationData

Specifies the authentication data.

PySide6.QtMqtt.QMqttServerConnectionProperties.availableProperties()#
Return type:

ServerPropertyDetails

Returns the available properties specified by the server.

PySide6.QtMqtt.QMqttServerConnectionProperties.clientIdAssigned()#
Return type:

bool

Returns true if the server assigned a new client identifier to the client.

See also

clientId()

PySide6.QtMqtt.QMqttServerConnectionProperties.isValid()#
Return type:

bool

Returns true if the server provided properties as part of the connection aknowledgment. Returns false if no properties have been provided.

PySide6.QtMqtt.QMqttServerConnectionProperties.maximumQoS()#
Return type:

quint8

Returns the maximum QoS level the server supports for publishing messages. Publishing messages with QoS level exceeding the maximum QoS level reported by the server is a protocol violation.

If the client does not need to support QoS 1 or QoS 2, it should restrict the maximum QoS level in any subscription it does to a value it can support; the server would then publish messages with the maximum of supported and restricted QoS levels.

The default value is 2.

PySide6.QtMqtt.QMqttServerConnectionProperties.reason()#
Return type:

str

Returns the reason string associated with this response.

PySide6.QtMqtt.QMqttServerConnectionProperties.reasonCode()#
Return type:

ReasonCode

Returns the reason code associated with this response.

PySide6.QtMqtt.QMqttServerConnectionProperties.responseInformation()#
Return type:

str

Returns the response information.

PySide6.QtMqtt.QMqttServerConnectionProperties.retainAvailable()#
Return type:

bool

Returns true if the server accepts retained messages. The default value is true.

PySide6.QtMqtt.QMqttServerConnectionProperties.serverKeepAlive()#
Return type:

quint16

Returns the number of seconds the server requested as keep alive. This overwrites the keep alive being set from the client side.

See also

setKeepAlive()

PySide6.QtMqtt.QMqttServerConnectionProperties.serverReference()#
Return type:

str

Returns a server address which can be used by the client alternatively to connect to. Typically, this is used together with the reason code 0x9c (Use another server) or 0x9c (Server moved).

PySide6.QtMqtt.QMqttServerConnectionProperties.sharedSubscriptionSupported()#
Return type:

bool

Returns true if the server accepts shared subscriptions. The default value is true.

PySide6.QtMqtt.QMqttServerConnectionProperties.subscriptionIdentifierSupported()#
Return type:

bool

Returns true if the server accepts subscription identifiers. Subscription identifiers can be passed to the server when creating a new subscription.

The default value is true.

PySide6.QtMqtt.QMqttServerConnectionProperties.wildcardSupported()#
Return type:

bool

Returns true if the server accepts subscriptions including wildcards. The default value is true.