Versions in this module Expand all Collapse all v1 v1.0.0 Jan 16, 2024 Changes in this version + type Config struct + Bootnodes []*enode.Node + Clock mclock.Clock + Log log.Logger + NetRestrict *netutil.Netlist + PingInterval time.Duration + PrivateKey *ecdsa.PrivateKey + RefreshInterval time.Duration + Unhandled chan<- ReadPacket + V5ProtocolID *[6]byte + ValidSchemes enr.IdentityScheme + type ReadPacket struct + Addr *net.UDPAddr + Data []byte + type Table struct + func (tab *Table) Nodes() []*enode.Node + type TalkRequestHandler func(enode.ID, *net.UDPAddr, []byte) []byte + type UDPConn interface + Close func() error + LocalAddr func() net.Addr + ReadFromUDP func(b []byte) (n int, addr *net.UDPAddr, err error) + WriteToUDP func(b []byte, addr *net.UDPAddr) (n int, err error) + type UDPv4 struct + func ListenUDP(c UDPConn, ln *enode.LocalNode, cfg Config) (*UDPv4, error) + func ListenV4(c UDPConn, ln *enode.LocalNode, cfg Config) (*UDPv4, error) + func (t *UDPv4) Close() + func (t *UDPv4) LookupPubkey(key *ecdsa.PublicKey) []*enode.Node + func (t *UDPv4) Ping(n *enode.Node) error + func (t *UDPv4) RandomNodes() enode.Iterator + func (t *UDPv4) RequestENR(n *enode.Node) (*enode.Node, error) + func (t *UDPv4) Resolve(n *enode.Node) *enode.Node + func (t *UDPv4) Self() *enode.Node + type UDPv5 struct + func ListenV5(conn UDPConn, ln *enode.LocalNode, cfg Config) (*UDPv5, error) + func (t *UDPv5) AllNodes() []*enode.Node + func (t *UDPv5) Close() + func (t *UDPv5) LocalNode() *enode.LocalNode + func (t *UDPv5) Lookup(target enode.ID) []*enode.Node + func (t *UDPv5) Ping(n *enode.Node) error + func (t *UDPv5) RandomNodes() enode.Iterator + func (t *UDPv5) RegisterTalkHandler(protocol string, handler TalkRequestHandler) + func (t *UDPv5) RequestENR(n *enode.Node) (*enode.Node, error) + func (t *UDPv5) Resolve(n *enode.Node) *enode.Node + func (t *UDPv5) Self() *enode.Node + func (t *UDPv5) TalkRequest(n *enode.Node, protocol string, request []byte) ([]byte, error) + func (t *UDPv5) TalkRequestToID(id enode.ID, addr *net.UDPAddr, protocol string, request []byte) ([]byte, error)