dcrm

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2018 License: GPL-3.0, GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//  0/1, 1 for test
	TEST    = 0 //dcrm test
	P2PTEST = 0 //p2p group test, bufio/stdin

)

Variables

This section is empty.

Functions

func GetEnodes

func GetEnodes() (int, string)

GetEnodes get enodes info return: string self.enode

int count of peers
string peers.id delimiter with dcrmdelimiter

func GetGroup

func GetGroup() (int, string)

func GetGroup(id discover.NodeID, ipa *net.UDPAddr) (int, string){

func Init

func Init(id discover.NodeID, ipa *net.UDPAddr)

func P2pInit

func P2pInit(port int, bn string, nodekeyfile string, staticnodesfile string)

func RegisterCallback

func RegisterCallback(callbackfunc func(interface{}))

func Send2Node

func Send2Node(enode string, msg *string)

func SendMsg

func SendMsg(msg string)

func StartTest

func StartTest()

Types

type Emitter

type Emitter struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewEmitter

func NewEmitter() *Emitter

Jump to

Keyboard shortcuts

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