Documentation ¶
Index ¶
- Variables
- type Upgrader
- func (u *Upgrader) UpgradeInbound(ctx context.Context, t transport.Transport, maconn manet.Conn) (transport.Conn, error)
- func (u *Upgrader) UpgradeListener(t transport.Transport, list manet.Listener) transport.Listener
- func (u *Upgrader) UpgradeOutbound(ctx context.Context, t transport.Transport, maconn manet.Conn, p peer.ID) (transport.Conn, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var AcceptQueueLength = 16
AcceptQueueLength is the number of connections to fully setup before not accepting any new connections
View Source
var ErrNilPeer = errors.New("nil peer")
ErrNilPeer is returned when attempting to upgrade an outbound connection without specifying a peer ID.
Functions ¶
This section is empty.
Types ¶
type Upgrader ¶
type Upgrader struct { Protector pnet.Protector Secure ss.Transport Muxer smux.Transport Filters *filter.Filters }
Upgrader is a multistream upgrader that can upgrade an underlying connection to a full transport connection (secure and multiplexed).
func (*Upgrader) UpgradeInbound ¶
func (u *Upgrader) UpgradeInbound(ctx context.Context, t transport.Transport, maconn manet.Conn) (transport.Conn, error)
UpgradeInbound upgrades the given inbound multiaddr-net connection into a full libp2p-transport connection.
func (*Upgrader) UpgradeListener ¶
UpgradeListener upgrades the passed multiaddr-net listener into a full libp2p-transport listener.
Click to show internal directories.
Click to hide internal directories.