IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QMqttServerConnectionProperties Class

The https:// class represents configuration options of a server a https:// is connected to.

This class was introduced in Qt 5.12.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QMqttServerConnectionProperties Class▲

  • Header: QMqttServerConnectionProperties

  • Since: Qt 5.12

  • qmake: QT += mqtt

  • Inherits: https://

Detailed Description▲

When a connection has been established the server might send additional details about the connection properties. Use https://() 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.

Connection properties are part of the MQTT 5.0 specification and cannot be used when connecting with a lower protocol level. See https:// for more information.

Member Type Documentation▲

 

enum QMqttServerConnectionProperties::ServerPropertyDetail▲

flags QMqttServerConnectionProperties::ServerPropertyDetails

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

Constant

Value

Description

https://::None

0x00000000

No property has been specified.

https://::SessionExpiryInterval

0x00000001

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

https://::MaximumReceive

0x00000002

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

https://::MaximumQoS

0x00000004

The maximum QoS level the server can understand.

https://::RetainAvailable

0x00000010

Specifies whether retained messages are supported.

https://::MaximumPacketSize

0x00000020

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

https://::AssignedClientId

0x00000040

Specifies whether the server assigned a client identifier.

https://::MaximumTopicAlias

0x00000080

Specifies the maximum amount of topic aliases.

https://::ReasonString

0x00000100

Specifies a string providing more details on connection state.

https://::UserProperty

0x00000200

Specifies additional user properties.

https://::WildCardSupported

0x00000400

Specifies whether the server supports wildcard subscriptions.

https://::SubscriptionIdentifierSupport

0x00000800

Specifies whether the server supports subscription identifiers.

https://::SharedSubscriptionSupport

0x00001000

Specifies whether the server supports shared subscriptions.

https://::ServerKeepAlive

0x00002000

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

https://::ResponseInformation

0x00004000

Specifies the response information.

https://::ServerReference

0x00008000

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

https://::AuthenticationMethod

0x00010000

Specifies the authentication method.

https://::AuthenticationData

0x00020000

Specifies the authentication data.

The ServerPropertyDetails type is a typedef for https://<ServerPropertyDetail>. It stores an OR combination of ServerPropertyDetail values.

Member Function Documentation▲

 

QMqttServerConnectionProperties::ServerPropertyDetails QMqttServerConnectionProperties::availableProperties() const▲

Returns the available properties specified by the server.

bool QMqttServerConnectionProperties::clientIdAssigned() const▲

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

See Also▲

See also https://()

bool QMqttServerConnectionProperties::isValid() const▲

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

quint8 QMqttServerConnectionProperties::maximumQoS() const▲

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.

See Also▲

See also https://(), QMqttClient::subscribe()

QString QMqttServerConnectionProperties::reason() const▲

Returns the reason string associated with this response.

QMqtt::ReasonCode QMqttServerConnectionProperties::reasonCode() const▲

Returns the reason code associated with this response.

QString QMqttServerConnectionProperties::responseInformation() const▲

Returns the response information.

bool QMqttServerConnectionProperties::retainAvailable() const▲

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

quint16 QMqttServerConnectionProperties::serverKeepAlive() const▲

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

See Also▲

See also https://()

QString QMqttServerConnectionProperties::serverReference() const▲

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

bool QMqttServerConnectionProperties::sharedSubscriptionSupported() const▲

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

bool QMqttServerConnectionProperties::subscriptionIdentifierSupported() const▲

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.

See Also▲

See also QMqttSubscriptionProperties::setSubscriptionIdentifier()

bool QMqttServerConnectionProperties::wildcardSupported() const▲

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

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+   

Ce document est disponible sous la licence https:// telle que publiée par la Free Software Foundation.