Versions in this module Expand all Collapse all v2 v2.0.1 Jul 5, 2020 Changes in this version + type Conn struct + func (self *Conn) Close() error + type NbrPeers struct + List map[common.PeerId]connectedPeer + func NewNbrPeers() *NbrPeers + func (self *NbrPeers) ReplacePeer(p *peer.Peer, net *NetServer) *peer.Peer + func (this *NbrPeers) Broadcast(msg types.Message) + func (this *NbrPeers) GetNbrNodeCnt() uint32 + func (this *NbrPeers) GetNeighborAddrs() []common.PeerAddr + func (this *NbrPeers) GetNeighborHeights() map[common.PeerId]uint64 + func (this *NbrPeers) GetNeighborMostHeight() uint64 + func (this *NbrPeers) GetNeighbors() []*peer.Peer + func (this *NbrPeers) GetPeer(id common.PeerId) *peer.Peer + func (this *NbrPeers) NodeExisted(uid common.PeerId) bool + type NetServer struct + NetChan chan *types.MsgPayload + Np *NbrPeers + func NewCustomNetServer(id *common.PeerKeyId, info *peer.PeerInfo, proto p2p.Protocol, ...) *NetServer + func NewNetServer(protocol p2p.Protocol, conf *config.P2PNodeConfig, ...) (*NetServer, error) + func (ns *NetServer) ConnectController() *connect_controller.ConnectController + func (ns *NetServer) Protocol() p2p.Protocol + func (self *NetServer) GetSubnetMembersInfo() []common.SubnetMemberInfo + func (this *NetServer) Broadcast(msg types.Message) + func (this *NetServer) Connect(addr string) + func (this *NetServer) GetConnectionCnt() uint32 + func (this *NetServer) GetHeight() uint64 + func (this *NetServer) GetHostInfo() *peer.PeerInfo + func (this *NetServer) GetID() common.PeerId + func (this *NetServer) GetMaxPeerBlockHeight() uint64 + func (this *NetServer) GetNeighborAddrs() []common.PeerAddr + func (this *NetServer) GetNeighbors() []*peer.Peer + func (this *NetServer) GetOutConnRecordLen() uint + func (this *NetServer) GetPeer(id common.PeerId) *peer.Peer + func (this *NetServer) IsOwnAddress(addr string) bool + func (this *NetServer) ReplacePeer(remotePeer *peer.Peer) + func (this *NetServer) Send(p *peer.Peer, msg types.Message) error + func (this *NetServer) SendTo(p common.PeerId, msg types.Message) + func (this *NetServer) SetHeight(height uint64) + func (this *NetServer) Start() error + func (this *NetServer) Stop()