mobile

package
v0.1.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: LGPL-3.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateConfigJSON

func GenerateConfigJSON() []byte

GenerateConfigJSON generates mobile-friendly configuration in JSON format

func GetVersion

func GetVersion() string

Types

type ConfigSummary

type ConfigSummary struct {
	PublicKey   string
	IPv6Address string
	IPv6Subnet  string
}

func SummaryForConfig

func SummaryForConfig(b []byte) *ConfigSummary

type MobileLogger

type MobileLogger struct {
}

func (MobileLogger) Write

func (nsl MobileLogger) Write(p []byte) (n int, err error)

type UQDA added in v0.1.0

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

UQDA mobile package is meant to "plug the gap" for mobile support, as Gomobile will not create headers for Swift/Obj-C etc if they have complex (non-native) types. Therefore for iOS we will expose some nice simple functions. Note that in the case of iOS we handle reading/writing to/from TUN in Swift therefore we use the "dummy" TUN interface instead.

func (*UQDA) GetAddressString added in v0.1.0

func (m *UQDA) GetAddressString() string

GetAddressString gets the node's IPv6 address

func (*UQDA) GetMTU added in v0.1.0

func (m *UQDA) GetMTU() int

GetMTU returns the configured node MTU. This must be called AFTER Start.

func (*UQDA) GetPathsJSON added in v0.1.0

func (m *UQDA) GetPathsJSON() (result string)

func (*UQDA) GetPeersJSON added in v0.1.0

func (m *UQDA) GetPeersJSON() (result string)

func (*UQDA) GetPublicKeyString added in v0.1.0

func (m *UQDA) GetPublicKeyString() string

GetPublicKeyString gets the node's public key in hex form

func (*UQDA) GetRoutingEntries added in v0.1.0

func (m *UQDA) GetRoutingEntries() int

GetRoutingEntries gets the number of entries in the routing table

func (*UQDA) GetSubnetString added in v0.1.0

func (m *UQDA) GetSubnetString() string

GetSubnetString gets the node's IPv6 subnet in CIDR notation

func (*UQDA) GetTreeJSON added in v0.1.0

func (m *UQDA) GetTreeJSON() (result string)

func (*UQDA) Recv added in v0.1.0

func (m *UQDA) Recv() ([]byte, error)

Recv waits for and reads a packet coming from UQDA. It will be a fully formed IPv6 packet

func (*UQDA) RecvBuffer added in v0.1.0

func (m *UQDA) RecvBuffer(buf []byte) (int, error)

Recv waits for and reads a packet coming from UQDA to given buffer, returning size of packet

func (*UQDA) RetryPeersNow added in v0.1.0

func (m *UQDA) RetryPeersNow()

Retry resets the peer connection timer and tries to dial them immediately.

func (*UQDA) Send added in v0.1.0

func (m *UQDA) Send(p []byte) error

Send sends a packet to UQDA. It should be a fully formed IPv6 packet

func (*UQDA) SendBuffer added in v0.1.0

func (m *UQDA) SendBuffer(p []byte, length int) error

Send sends a packet from given buffer to UQDA. From first byte up to length.

func (*UQDA) StartAutoconfigure added in v0.1.0

func (m *UQDA) StartAutoconfigure() error

StartAutoconfigure starts a node with a randomly generated config

func (*UQDA) StartJSON added in v0.1.0

func (m *UQDA) StartJSON(configjson []byte) error

StartJSON starts a node with the given JSON config. You can get JSON config (rather than HJSON) by using the GenerateConfigJSON() function

func (*UQDA) Stop added in v0.1.0

func (m *UQDA) Stop() error

Stop the mobile UQDA instance

Jump to

Keyboard shortcuts

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