# Packages
Package discover implements the Node Discovery Protocol.
Package dnsdisc implements node discovery via DNS (EIP-1459).
Package enr implements Ethereum Node Records as defined in EIP-778.
Package msgrate allows estimating the throughput of peers for more balanced syncs.
Package nat provides access to common network port mapping protocols.
Package netutil contains extensions to the net package.
Package rlpx implements the RLPx transport protocol.
# Functions
ExpectMsg reads a message from r and verifies that its code and encoded RLP content match the provided values.
MsgPipe creates a message pipe.
NewPeer returns a peer for testing purposes.
NewPeerPipe creates a peer for testing purposes.
Send writes an RLP-encoded message with the given code.
SendItems writes an RLP with the given code and data elements.
# Constants
HandleHistName is the prefix of the per-packet serving time histograms.
PeerEventTypeAdd is the type of event emitted when a peer is added to a p2p.Server.
PeerEventTypeDrop is the type of event emitted when a peer is dropped from a p2p.Server.
PeerEventTypeMsgRecv is the type of event emitted when a message is received from a peer.
PeerEventTypeMsgSend is the type of event emitted when a message is successfully sent to a peer.
# Variables
ErrPipeClosed is returned from pipe operations after the pipe has been closed.
# Structs
Cap is the structure of a peer capability.
Config holds Server options.
Msg defines the structure of a p2p message.
MsgPipeRW is an endpoint of a MsgReadWriter pipe.
NodeInfo represents a short summary of the information known about the host.
Peer represents a connected remote node.
PeerEvent is an event emitted when peers are either added or dropped from a p2p.Server or when a message is sent or received on a peer connection.
PeerInfo represents a short summary of the information known about a connected peer.
Protocol represents a P2P subprotocol implementation.
Server manages all peer connections.
# Interfaces
MsgReadWriter provides reading and writing of encoded messages.
NodeDialer is used to connect to nodes in the network, typically by using an underlying net.Dialer but also using net.Pipe in tests.