Libp2p.ConnUpgrade (libp2p_elixir v0.9.0)
Connection upgrade pipeline: multistream-select → noise → multistream-select → yamux.
This module performs the on-wire negotiation and returns a Libp2p.SecureConn.
Summary
Types
@type role() :: :initiator | :responder
@type socket() :: Libp2p.Transport.Tcp.socket()
Functions
@spec upgrade_inbound(socket(), Libp2p.Identity.t(), keyword()) :: {:ok, Libp2p.SecureConn.t(), Libp2p.Yamux.Session.t(), binary()} | {:error, term()}
@spec upgrade_outbound(socket(), Libp2p.Identity.t(), keyword()) :: {:ok, Libp2p.SecureConn.t(), Libp2p.Yamux.Session.t(), binary()} | {:error, term()}