arednlink

package
v0.0.263 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const HopDefault = 64

Variables

This section is empty.

Functions

func HandleConnection added in v0.0.232

func HandleConnection(
	config *config.Config,
	conn net.Conn,
	broadcastChan chan Message,
	hosts *xsync.MapOf[string, string],
	services *xsync.MapOf[string, string],
	routes ***xsync.MapOf[string, string],
)

Types

type Command added in v0.0.223

type Command byte
const (
	CommandVersion        Command = 'V'
	CommandUpdateHosts    Command = 'H'
	CommandUpdateServices Command = 'U'
	CommandSync           Command = 'S'
	CommandKeepAlive      Command = 'K'
)

func (Command) String added in v0.0.223

func (c Command) String() string

type Connection added in v0.0.228

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

type Message added in v0.0.223

type Message struct {
	Length    uint16
	Command   Command
	Payload   []byte
	Source    net.IP
	Hops      uint8
	ConnID    string // Internal use for tracking connections
	DestIface string // Internal use for tracking interfaces
}

func (*Message) Bytes added in v0.0.228

func (m *Message) Bytes() []byte

type Server

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

func NewServer

func NewServer(
	config *config.Config,
	routes ***xsync.MapOf[string, string],
	hosts *xsync.MapOf[string, string],
	services *xsync.MapOf[string, string],
	broadcastChan chan Message,
) (*Server, error)

func (*Server) Stop

func (s *Server) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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