Documentation ¶
Index ¶
- func GenerateConfigJSON() []byte
- func GetVersion() string
- type MobileLogger
- type Ruvchain
- func (m *Ruvchain) GetAddressString() string
- func (m *Ruvchain) GetCoordsString() string
- func (m *Ruvchain) GetDHTJSON() (result string)
- func (m *Ruvchain) GetMTU() int
- func (m *Ruvchain) GetPeersJSON() (result string)
- func (m *Ruvchain) GetPublicKeyString() string
- func (m *Ruvchain) GetSubnetString() 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) GetCoordsString ¶
GetCoordsString gets the node's coordinates
func (*Ruvchain) GetDHTJSON ¶
func (*Ruvchain) GetPeersJSON ¶
func (*Ruvchain) GetPublicKeyString ¶
GetPublicKeyString gets the node's public key in hex form
func (*Ruvchain) GetSubnetString ¶
GetSubnetString gets the node's IPv6 subnet in CIDR notation
func (*Ruvchain) Recv ¶
Recv waits for and reads a packet coming from RiV-Ruvchain. It will be a fully formed IPv6 packet
func (*Ruvchain) RecvBuffer ¶
Recv waits for and reads a packet coming from RiV-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) Send ¶
Send sends a packet to RiV-Ruvchain. It should be a fully formed IPv6 packet
func (*Ruvchain) SendBuffer ¶
Send sends a packet from given buffer to RiV-Ruvchain. From first byte up to length.
func (*Ruvchain) StartAutoconfigure ¶
StartAutoconfigure starts a node with a randomly generated config