encoding

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeMessage

func DecodeMessage(b *bytes.Buffer) (msg *gmqtt.Message, err error)

DecodeMessage decodes message from buffer.

func DecodeMessageFromBytes

func DecodeMessageFromBytes(b []byte) (msg *gmqtt.Message, err error)

DecodeMessageFromBytes decodes message from bytes.

func DecodeSession

func DecodeSession(b *bytes.Buffer) (sess *gmqtt.Session, err error)

func EncodeMessage

func EncodeMessage(msg *gmqtt.Message, b *bytes.Buffer)

EncodeMessage encodes message into bytes and write it to the buffer

func EncodeSession

func EncodeSession(sess *gmqtt.Session, b *bytes.Buffer)

func ReadBool

func ReadBool(r *bytes.Buffer) (bool, error)

func ReadString

func ReadString(r *bytes.Buffer) (b []byte, err error)

func ReadUint16

func ReadUint16(r *bytes.Buffer) (uint16, error)

func ReadUint32

func ReadUint32(r *bytes.Buffer) (uint32, error)

func WriteBool

func WriteBool(w *bytes.Buffer, b bool)

func WriteString

func WriteString(w *bytes.Buffer, s []byte)

func WriteUint16

func WriteUint16(w *bytes.Buffer, i uint16)

func WriteUint32

func WriteUint32(w *bytes.Buffer, i uint32)

Types

This section is empty.

Jump to

Keyboard shortcuts

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