allof

package
v0.0.0-...-0973138 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(packet, topic []byte) (ttl byte, data []byte, err error)

func Encode

func Encode(ttl byte, msg, topic []byte) []byte

Types

type Node

type Node struct {
	// contains filtered or unexported fields
}

func Listen

func Listen(network, addr string, topic []byte) (*Node, error)

func (*Node) Add

func (node *Node) Add(ip net.IP, port int)

func (*Node) Addr

func (node *Node) Addr() netip.AddrPort

func (*Node) Close

func (node *Node) Close() error

func (*Node) Ping

func (node *Node) Ping() error

func (*Node) Recv

func (node *Node) Recv(ctx context.Context) ([]byte, error)

func (*Node) Send

func (node *Node) Send(ttl byte, msg []byte) error

Jump to

Keyboard shortcuts

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