message

package
v2.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2022 License: Apache-2.0 Imports: 4 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	MaxMessageSize    message.OptionID = 2
	BlockWiseTransfer message.OptionID = 4
)
View Source
const (
	AlternativeAddress message.OptionID = 2
	HoldOff            message.OptionID = 4
)
View Source
const (
	BadCSMOption message.OptionID = 2
)

Signal Abort Option IDs

+-----+---+---+---------------------+--------+--------+---------+
| No. | C | R | Name                | Format | Length | Default |
+-----+---+---+---------------------+--------+--------+---------+
|   2 |   |   | Bad-CSM-Option      | uint   | 0-2    | (none)  |
+-----+---+---+---------------------+--------+--------+---------+
C=Critical, R=Repeatable
View Source
const (
	Custody message.OptionID = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Token   []byte
	Payload []byte

	Options message.Options //Options must be sorted by ID
	Code    codes.Code
}

TcpMessage is a CoAP MessageBase that can encode itself for Message transport.

func (Message) Marshal

func (m Message) Marshal() ([]byte, error)

func (Message) MarshalTo

func (m Message) MarshalTo(buf []byte) (int, error)

func (Message) Size

func (m Message) Size() (int, error)

func (*Message) Unmarshal

func (m *Message) Unmarshal(data []byte) (int, error)

func (*Message) UnmarshalWithHeader

func (m *Message) UnmarshalWithHeader(header MessageHeader, data []byte) (int, error)

type MessageHeader

type MessageHeader struct {
	Token     []byte
	HeaderLen uint32
	TotalLen  uint32
	Code      codes.Code
}

func (*MessageHeader) Unmarshal

func (i *MessageHeader) Unmarshal(data []byte) error

Unmarshal infers information about a Message CoAP message from the first fragment.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL