nym

package
v0.0.0-...-5d5b006 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConn

func GetConn(uri string) (*websocket.Conn, error)

func GetSelfAddressBinary

func GetSelfAddressBinary(conn *websocket.Conn) []byte

func GetSelfAddressText

func GetSelfAddressText(conn *websocket.Conn) string

func Receive

func Receive(conn *websocket.Conn) ([]byte, error)

func ResponseIsBinary

func ResponseIsBinary(rawResponse []byte) bool

func ResponseIsError

func ResponseIsError(rawResponse []byte) bool

func ResponseIsSelfAddress

func ResponseIsSelfAddress(rawResponse []byte) bool

func SendBinary

func SendBinary(conn *websocket.Conn, address []byte, data []byte) error

func SendBinaryFile

func SendBinaryFile(conn *websocket.Conn, address []byte, filename string) error

func SendText

func SendText(conn *websocket.Conn, address string, message string, withReplySurb bool) error

Types

type Command

type Command struct {
}

func ReceiveCommand

func ReceiveCommand(conn *websocket.Conn) (bool, Command, error)

type Message

type Message struct {
	RawMessage []byte
	Binary     []byte
	Text       string
	Json       map[string]interface{}
	Surb       []byte
	Error      string
}

func ReceiveMessage

func ReceiveMessage(conn *websocket.Conn) (Message, error)

type SignedCommand

type SignedCommand struct {
	Command   Command
	Identity  string
	Signature []byte
}

Jump to

Keyboard shortcuts

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