message

package
v0.0.0-...-dc806d7 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const ASCII_CR = '\r' // DEC:13, HEX:0D.
View Source
const ASCII_LF = '\n' // DEC:10, HEX:0A.
View Source
const END = "\r\n"
View Source
const FIELDS_SEPARATOR = " "
View Source
const KEY_VALUE_SEPARATOR = "="
View Source
const LAST_BYTE = ASCII_LF
View Source
const LENGTH_MIN = 2
View Source
const PARAM_BMODE = "bmode"
View Source
const PARAM_HTTP_PORT = "http_port"
View Source
const PARAM_KEY = "key"
View Source
const PARAM_VERSION = "version"
View Source
const PARAM_VERSION_CODE = "version_code"
View Source
const PRELAST_BYTE = ASCII_CR
View Source
const TYPE_1 = "HELLOBG"
View Source
const TYPE_2 = "HELLOTS"
View Source
const TYPE_3 = "READY"
View Source
const VERSION_SEPARATOR = "."
View Source
const X_SEPARATOR = "-"

Variables

This section is empty.

Functions

func CheckLength

func CheckLength(message []byte, bytesSent int) error

Checks whether Message has been fully sent.

func VersionMajor

func VersionMajor(ver string) string

Reads major Version from the full Version String.

Types

type Message

type Message struct {
	Type       string
	Parameters []Parameter
}

func Parse

func Parse(str *string) (*Message, error)

Parses raw Reply into Message Structure.

type Parameter

type Parameter struct {
	Key   string
	Value string
}

Jump to

Keyboard shortcuts

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