Conn is a connection to a remote peer. It multiplexes streams.
Usually there is no need to use a Conn directly, but it may
be useful to get information about the peer on the other side:
Host is an object participating in a p2p network, which
implements protocols or provides services. It handles
requests like a Server, and issues requests like a Client.
It is called Host because it is both Server and Client (and Peer
may be confusing).
Multiplexer wraps a connection with a stream multiplexing
implementation and returns a MuxedConn that supports opening
multiple streams over the underlying connection
Network is the interface used to connect to the outside world.
It dials and listens for connections. it uses a Swarm to pool
connections. Connections are encrypted with a TLS-like protocol.
NotifyBundle implements Notifiee by calling any of the functions set on it,
and nop'ing if they are unset. This is the easy way to register for
notifications.
Represents a bidirectional channel between two agents in
a libp2p network. "agent" is as granular as desired, potentially
being a "request -> reply" pair, or whole protocols.
Switch is the component responsible for "dispatching" incoming stream requests to
their corresponding stream handlers. It is both a Negotiator and a Router.
Router is an interface that allows users to add and remove protocol handlers,
which will be invoked when incoming stream requests for registered protocols
are accepted.
MessageSizeMax is a soft (recommended) maximum for network messages.
One can write more, as the interface is a stream. But it is useful
to bunch it up into multiple read/writes when the whole message is
a single, large serialized object.