Documentation ¶
Index ¶
- func GenerateConfigJSON() []byte
- func GetVersion() string
- type Mesh
- func (m *Mesh) GetAddressString() string
- func (m *Mesh) GetCoordsString() string
- func (m *Mesh) GetDHTJSON() (result string)
- func (m *Mesh) GetMTU() int
- func (m *Mesh) GetPeersJSON() (result string)
- func (m *Mesh) GetPublicKeyString() string
- func (m *Mesh) GetSubnetString() string
- func (m *Mesh) Recv() ([]byte, error)
- func (m *Mesh) RecvBuffer(buf []byte) (int, error)
- func (m *Mesh) RetryPeersNow()
- func (m *Mesh) Send(p []byte) error
- func (m *Mesh) SendBuffer(p []byte, length int) error
- func (m *Mesh) StartAutoconfigure() error
- func (m *Mesh) StartJSON(configjson []byte) error
- func (m *Mesh) Stop() error
- type MobileLogger
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 Mesh ¶
type Mesh struct {
// contains filtered or unexported fields
}
Mesh 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 (*Mesh) GetAddressString ¶
GetAddressString gets the node's IPv6 address
func (*Mesh) GetCoordsString ¶
GetCoordsString gets the node's coordinates
func (*Mesh) GetDHTJSON ¶
func (*Mesh) GetPeersJSON ¶
func (*Mesh) GetPublicKeyString ¶
GetPublicKeyString gets the node's public key in hex form
func (*Mesh) GetSubnetString ¶
GetSubnetString gets the node's IPv6 subnet in CIDR notation
func (*Mesh) Recv ¶
Recv waits for and reads a packet coming from RiV-mesh. It will be a fully formed IPv6 packet
func (*Mesh) RecvBuffer ¶
Recv waits for and reads a packet coming from RiV-mesh to given buffer, returning size of packet
func (*Mesh) RetryPeersNow ¶
func (m *Mesh) RetryPeersNow()
Retry resets the peer connection timer and tries to dial them immediately.
func (*Mesh) SendBuffer ¶
Send sends a packet from given buffer to RiV-mesh. From first byte up to length.
func (*Mesh) StartAutoconfigure ¶
StartAutoconfigure starts a node with a randomly generated config
type MobileLogger ¶
type MobileLogger struct { }