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