upgrader

package
v0.0.0-...-160218e Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 19 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

func New

func New(security []sec.SecureTransport, muxers []StreamMuxer, psk ipnet.PSK, rcmgr network.ResourceManager, connGater connmgr.ConnectionGater, opts ...Option) (transport.Upgrader, error)

Types

type Option

type Option func(*upgrader) error

func WithAcceptTimeout

func WithAcceptTimeout(t time.Duration) Option

type StreamMuxer

type StreamMuxer struct {
	ID    protocol.ID
	Muxer network.Multiplexer
}

Jump to

Keyboard shortcuts

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