discovery

package
v0.0.0-...-ef73a9a Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discovery

type Discovery struct {
	// contains filtered or unexported fields
}

func NewDiscovery

func NewDiscovery(net p2p.P2P, maskLst []string, maskFilter p2p.AddressFilter, refleshInterval time.Duration) *Discovery

func (*Discovery) AddrHandle

func (self *Discovery) AddrHandle(ctx *p2p.Context, msg *types.Addr)

func (*Discovery) AddrReqHandle

func (self *Discovery) AddrReqHandle(ctx *p2p.Context)

func (*Discovery) FindNodeHandle

func (self *Discovery) FindNodeHandle(ctx *p2p.Context, freq *types.FindNodeReq)

func (*Discovery) FindNodeResponseHandle

func (self *Discovery) FindNodeResponseHandle(ctx *p2p.Context, fresp *types.FindNodeResp)

func (*Discovery) OnAddPeer

func (self *Discovery) OnAddPeer(info *peer.PeerInfo)

func (*Discovery) OnDelPeer

func (self *Discovery) OnDelPeer(info *peer.PeerInfo)

func (*Discovery) Start

func (self *Discovery) Start()

func (*Discovery) Stop

func (self *Discovery) Stop()

Jump to

Keyboard shortcuts

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