Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMessageTruncated = errors.New("message is truncated") ErrMessageInvalidVersion = errors.New("message has invalid version") )
Functions ¶
Types ¶
type Message ¶
type Message struct { Token message.Token Payload []byte Options message.Options //Options must be sorted by ID Code codes.Code MessageID uint16 Type Type }
TcpMessage is a CoAP MessageBase that can encode itself for Message transport.
type Type ¶
type Type uint8
Type represents the message type. It's only part of CoAP UDP messages. Reliable transports like TCP do not have a type.
const ( // Confirmable messages require acknowledgements. Confirmable Type = 0 // NonConfirmable messages do not require acknowledgements. NonConfirmable Type = 1 // Acknowledgement is a message indicating a response to confirmable message. Acknowledgement Type = 2 // Reset indicates a permanent negative acknowledgement. Reset Type = 3 )
Click to show internal directories.
Click to hide internal directories.