(Assuming the adoption of the connect flags changes in _https://issues.oasis-open.org/browse/MQTT-576)._
_(Also assuming the adoption of the the authentication changes in https://issues.oasis-open.org/browse/MQTT-568)._
Section 5.2.2 MsgType
Add CAPABILITIES MsgType to table 3. Value 0x19
Section 5.4 Format of Individual Messages
5.4.5.2 CAPABILITIES
Length
(octet 0) |
MsgType
(1) |
Capability Type
(3) |
Capability Value
(4,5) |
- Length and MsgType: see Section 5.2
- Capability Type: one of:
- Maximum receive packet size (0x01)
- Receive maximum (0x02)
- Receiving Topic Alias maximum (0x03)
- User defined (0xF0 - 0xFF)
- Capability value: the numeric limit relevant to the preceding capability type.
Capability Type and Capability Value pairs may be repeated to set more than one value. The number of Capability Types must equal the number of Capability Values. Capability Type values must not be included more than once.
The CAPABILITIES message allows the client to change the default settings for a number of limits which are intended to protect the client from excessive resource use due to server actions. It is sent by the client after a CONNECT message in which the capabilities flag is set to 1. It must be sent only once per connection, before a CONNACK is received.
6.16 Capabilities
The purpose of defining capabilities is to protect MQTT-SN client applications which run on devices with limited resources such as storage, memory or battery life. The default capability settings are chosen with the goal that most applications need not change them.
The defaults are:
- Receive maximum: 1
- Maximum packet size: 128
- Topic Alias maximum: 3
If a server receives a CONNECT message in which the capabilities flag is set, then it must wait to receive a CAPABILITIES message from the client before sending a positive CONNACK.
There is a range of capability element types which are reserved for user defined capabilities. The meaning of these values will be understood only by specific implementations and should be avoided for maximum application portability.
It is a protocol error for the server to behave in such a way as to exceed the limitations signalled by the client.