pub enum Type {
Confirmable = 0,
NonConfirmable = 1,
Acknowledgement = 2,
Reset = 3,
}Expand description
Message Type as defined in https://www.rfc-editor.org/rfc/rfc7252#page-8
Variants§
Confirmable = 0
From https://www.rfc-editor.org/rfc/rfc7252#page-8: “Some messages require an acknowledgement. These messages are called “Confirmable”. When no packets are lost, each Confirmable message elicits exactly one return message of type Acknowledgement or type Reset.“
NonConfirmable = 1
From https://www.rfc-editor.org/rfc/rfc7252#page-8: “Some other messages do not require an acknowledgement. This is particularly true for messages that are repeated regularly for application requirements, such as repeated readings from a sensor.”
Acknowledgement = 2
From https://www.rfc-editor.org/rfc/rfc7252#page-8: “An Acknowledgement message acknowledges that a specific Confirmable message arrived. By itself, an Acknowledgement message does not indicate success or failure of any request encapsulated in the Confirmable message, but the Acknowledgement message may also carry a Piggybacked Response […].”
Reset = 3
From https://www.rfc-editor.org/rfc/rfc7252#page-8: “A Reset message indicates that a specific message (Confirmable or Non-confirmable) was received, but some context is missing to properly process it. This condition is usually caused when the receiving node has rebooted and has forgotten some state that would be required to interpret the message. Provoking a Reset message (e.g., by sending an Empty Confirmable message) is also useful as an inexpensive check of the liveness of an endpoint (“CoAP ping”).“