utility

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ACKNOWLEDGEMENT = "OK\r\n"
	CONN_TYPE       = "tcp"
	CHUNK_SIZE      = 1460
	SAMPLE          = 10240
)

Variables

This section is empty.

Functions

func DetectContents

func DetectContents(message string, topic string) string

func EncapsulatePayload

func EncapsulatePayload(message string) string

func InboundMessageFlow

func InboundMessageFlow(server string, port int, topic string, arrival string)

func MakeTimestamp

func MakeTimestamp() int64

func OutboundMessageFlow

func OutboundMessageFlow(server string, port int, topic string, destination string)

func ProcessMessage

func ProcessMessage(message string, conn net.Conn)

func PublishPayload

func PublishPayload(server string, port int, topic string, message string)

func RecieveMessage

func RecieveMessage(destination string, messages chan<- string) error

func RepackageContents

func RepackageContents(message string, topic string) string

func SendMessage

func SendMessage(input string, client string)

func StartPlaceholderClient

func StartPlaceholderClient(host string, port int)

func StartPlaceholderServer

func StartPlaceholderServer(host string, port int)

func UnencapsulatePayload

func UnencapsulatePayload(message string) string

func Verification

func Verification(data string) string

Types

type InputDiodeMessage

type InputDiodeMessage struct {
	Time       int    `json:"time"`
	Topic      string `json:"topic"`
	B64Payload string `json:"b64payload"`
}

type OutputDiodeMessage

type OutputDiodeMessage struct {
	Time       int    `json:"time"`
	Topic      string `json:"topic"`
	B64Payload string `json:"b64payload"`
	Payload    string `json:"payload"`
	Length     int    `json:"length"`
	Checksum   string `json:"checksum"`
}

Jump to

Keyboard shortcuts

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