Versions in this module Expand all Collapse all v0 v0.7.2 Apr 16, 2020 v0.7.1 Apr 9, 2020 Changes in this version + type NbrPeers struct + List map[uint64]*Peer + func (this *NbrPeers) AddNbrNode(p *Peer) + func (this *NbrPeers) Broadcast(msg types.Message) + func (this *NbrPeers) DelNbrNode(id uint64) (*Peer, bool) + func (this *NbrPeers) GetNbrNodeCnt() uint32 + func (this *NbrPeers) GetNeighborAddrs() []common.PeerAddr + func (this *NbrPeers) GetNeighborHeights() map[uint64]uint64 + func (this *NbrPeers) GetNeighborMostHeight() uint64 + func (this *NbrPeers) GetNeighbors() []*Peer + func (this *NbrPeers) GetPeer(id uint64) *Peer + func (this *NbrPeers) Init() + func (this *NbrPeers) NodeEstablished(id uint64) bool + func (this *NbrPeers) NodeExisted(uid uint64) bool + type Peer struct + Link *conn.Link + func NewPeer() *Peer + func (this *Peer) AttachChan(msgchan chan *types.MsgPayload) + func (this *Peer) Close() + func (this *Peer) DumpInfo() + func (this *Peer) GetAddr() string + func (this *Peer) GetAddr16() ([16]byte, error) + func (this *Peer) GetContactTime() time.Time + func (this *Peer) GetHeight() uint64 + func (this *Peer) GetHttpInfoPort() uint16 + func (this *Peer) GetHttpInfoState() bool + func (this *Peer) GetID() uint64 + func (this *Peer) GetPort() uint16 + func (this *Peer) GetRelay() bool + func (this *Peer) GetServices() uint64 + func (this *Peer) GetSoftVersion() string + func (this *Peer) GetState() uint32 + func (this *Peer) GetTimeStamp() int64 + func (this *Peer) GetVersion() uint32 + func (this *Peer) Send(msg types.Message) error + func (this *Peer) SendRaw(msgType string, msgPayload []byte) error + func (this *Peer) SetHeight(height uint64) + func (this *Peer) SetHttpInfoPort(port uint16) + func (this *Peer) SetHttpInfoState(httpInfo bool) + func (this *Peer) SetState(state uint32) + func (this *Peer) UpdateInfo(t time.Time, version uint32, services uint64, syncPort uint16, nonce uint64, ...) + type PeerCom struct + func (this *PeerCom) GetHeight() uint64 + func (this *PeerCom) GetHttpInfoPort() uint16 + func (this *PeerCom) GetID() uint64 + func (this *PeerCom) GetPort() uint16 + func (this *PeerCom) GetRelay() bool + func (this *PeerCom) GetServices() uint64 + func (this *PeerCom) GetSoftVersion() string + func (this *PeerCom) GetVersion() uint32 + func (this *PeerCom) SetHeight(height uint64) + func (this *PeerCom) SetHttpInfoPort(port uint16) + func (this *PeerCom) SetID(id uint64) + func (this *PeerCom) SetPort(port uint16) + func (this *PeerCom) SetRelay(relay bool) + func (this *PeerCom) SetServices(services uint64) + func (this *PeerCom) SetSoftVersion(softVer string) + func (this *PeerCom) SetVersion(version uint32)