Versions in this module Expand all Collapse all v1 v1.10.28 Jan 9, 2023 Changes in this version + type Config struct + Bootnodes []*enode.Node + Clock mclock.Clock + Log log.Logger + NetRestrict *netutil.Netlist + PrivateKey *ecdsa.PrivateKey + Unhandled chan<- ReadPacket + V5ProtocolID *[6]byte + ValidSchemes enr.IdentityScheme + type ReadPacket struct + Addr *net.UDPAddr + Data []byte + type Table struct + func (tab *Table) ReadRandomNodes(buf []*enode.Node) (n int) + 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) + type V5Config struct + ProtocolID *[6]byte