connection

package
v0.0.0-...-4b8ecad Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DisconnectHandler = func(node pipes.Node) {}
View Source
var GeneralPrefix []byte = nil

Functions

func ConnectUDP

func ConnectUDP(node pipes.Node) error

func ConnectWS

func ConnectWS(node pipes.Node) error

func Decrypt

func Decrypt(node string, msg []byte) ([]byte, error)

func Encrypt

func Encrypt(node string, msg []byte) ([]byte, error)

func ExistsUDP

func ExistsUDP(node string) bool

func ExistsWS

func ExistsWS(node string) bool

func GetUDP

func GetUDP(node string) *net.UDPConn

func GetWS

func GetWS(node string) *websocket.Conn

func IterateUDP

func IterateUDP(f func(key string, value *net.UDPConn) bool)

Range calls f sequentially for each key and value present in the map. If f returns false, range stops the iteration.

func IterateWS

func IterateWS(f func(key string, value *websocket.Conn) bool)

Range calls f sequentially for each key and value present in the map. If f returns false, range stops the iteration.

func RemoveUDP

func RemoveUDP(node string)

func RemoveWS

func RemoveWS(node string)

func SetupDisconnections

func SetupDisconnections()

Types

type AdoptionRequest

type AdoptionRequest struct {
	Token    string     `json:"tk"`
	Adopting pipes.Node `json:"adpt"`
}

Jump to

Keyboard shortcuts

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