upgrader

package
v0.23.4 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: MIT Imports: 16 Imported by: 36

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(secureMuxer sec.SecureMuxer, muxer network.Multiplexer, opts ...Option) (transport.Upgrader, error)

Types

type Option

type Option func(*upgrader) error

func WithAcceptTimeout

func WithAcceptTimeout(t time.Duration) Option

func WithConnectionGater

func WithConnectionGater(g connmgr.ConnectionGater) Option

func WithPSK

func WithPSK(psk ipnet.PSK) Option

func WithResourceManager

func WithResourceManager(m network.ResourceManager) Option

Jump to

Keyboard shortcuts

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