Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnnouncePacket ¶
AnnouncePacket contains information about the current node to send to other nodes
type Interface ¶
type Interface struct { ErrChan chan<- error MessageChan <-chan interface{} // contains filtered or unexported fields }
Interface maintains connectivity with the mesh network, and provides functions for sending and receiving on the network. TODO: function for sending to addr, send to node name receive from node, receive from all
func NewInterface ¶
func NewInterface(nodeName string, dataReceive udp.NetReader, announceSend udp.NetWriter, announceReceive udp.NetReader, settings InterfaceSettings) (*Interface, error)
NewInterface creates a net interface. addr must be of form ip:port. returns error if udp address resolution fails.
func (*Interface) Close ¶
func (n *Interface) Close()
Close stops the announce daemon and closes all open connections and channels
func (*Interface) StartAnnounce ¶
func (n *Interface) StartAnnounce()
StartAnnounce starts announcing the node to the network
type InterfaceSettings ¶
InterfaceSettings contains settings for the net interface
Click to show internal directories.
Click to hide internal directories.