utils

package
v0.0.0-...-fcb1709 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: MIT, MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Message2IP

func Message2IP(msg *Message) ([][]byte, error)

Message2IP converts a given message to IP

Types

type Message

type Message struct {
	CID     string      `json:"cid"`
	Payload interface{} `json:"payload"`
}

Message encapsulates connection ID it received from or to be sent to and a payload received from or should be sent to Websocket connection.

func IP2Message

func IP2Message(ip [][]byte) (*Message, error)

IP2Message converts a given IP to message structure

Jump to

Keyboard shortcuts

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