stream

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2020 License: AGPL-3.0, MIT Imports: 14 Imported by: 0

Documentation

Index

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    sec.SecureTransport
	Muxer     mux.Multiplexer
	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.CapableConn, error)

UpgradeInbound upgrades the given inbound multiaddr-net connection into a full libp2p-transport connection.

func (*Upgrader) UpgradeListener

func (u *Upgrader) UpgradeListener(t transport.Transport, list manet.Listener) transport.Listener

UpgradeListener upgrades the passed multiaddr-net listener into a full libp2p-transport listener.

func (*Upgrader) UpgradeOutbound

func (u *Upgrader) UpgradeOutbound(ctx context.Context, t transport.Transport, maconn manet.Conn, p peer.ID) (transport.CapableConn, error)

UpgradeOutbound upgrades the given outbound multiaddr-net connection into a full libp2p-transport connection.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL