Documentation ¶
Index ¶
Constants ¶
View Source
const ( MESSAGE_LEN13_BASE = 13 MESSAGE_LEN14_BASE = 269 MESSAGE_LEN15_BASE = 65805 MESSAGE_MAX_LEN = 0x7fff0000 // Large number that works in 32-bit builds. )
Variables ¶
View Source
var ( ErrMessageTruncated = errors.New("message is truncated") ErrMessageInvalidVersion = errors.New("message has invalid version") )
Functions ¶
Types ¶
type Message ¶
type Message struct { Code codes.Code Token message.Token Payload []byte MessageID uint16 Type Type Options message.Options //Options must be sorted by ID }
TcpMessage is a CoAP MessageBase that can encode itself for Message transport.
type Type ¶
type Type uint8
Type represents the message 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.