xmulti

package
v0.0.0-...-3d1188e Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

View Source
const (
	MultiAddrDialTypeTurn = MultiAddrDialType(iota)
	MultiAddrDialTypeGo
)

Variables

View Source
var DefaultMultiAddrDialer = NewDefaultMultiAddrDialer()
View Source
var DefaultStreamDialerMap = map[string]xnetutil.Dialer{
	"tcp":  &net.Dialer{},
	"udp":  xquic.NewDialer(nil, nil),
	"quic": xquic.NewDialer(nil, nil),
}

Functions

func NewMultiListener

func NewMultiListener(ctx context.Context, bind bool, lns ...net.Listener) (net.Listener, error)

func NewMultiListenerFromAddr

func NewMultiListenerFromAddr(ctx context.Context, bind bool, addr ...net.Addr) (net.Listener, error)

Types

type MultiAddrDialType

type MultiAddrDialType uint8

type MultiAddrDialer

type MultiAddrDialer struct {
	// contains filtered or unexported fields
}

func NewDefaultMultiAddrDialer

func NewDefaultMultiAddrDialer() *MultiAddrDialer

func NewMultiAddrDialer

func NewMultiAddrDialer(sType MultiAddrDialType, drMap map[string]xnetutil.Dialer) *MultiAddrDialer

func (*MultiAddrDialer) Dial

func (md *MultiAddrDialer) Dial(network string, address string) (conn net.Conn, err error)

func (*MultiAddrDialer) DialContext

func (md *MultiAddrDialer) DialContext(ctx context.Context, network string, address string) (conn net.Conn, err error)

func (*MultiAddrDialer) MultiDial

func (md *MultiAddrDialer) MultiDial(addr ...net.Addr) (conn net.Conn, err error)

func (*MultiAddrDialer) MultiDialContext

func (md *MultiAddrDialer) MultiDialContext(ctx context.Context, addr ...net.Addr) (conn net.Conn, err error)

Jump to

Keyboard shortcuts

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