network

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNetworkUnix = errors.New(`network unix only supported on linux`)

Functions

func Bridging

func Bridging(c0, c1 io.ReadWriteCloser, pool *pool.Pool, duration time.Duration)

func Copy

func Copy(dst io.Writer, src io.Reader, pool *pool.Pool)

func NewAddr

func NewAddr(network, addr string) net.Addr

Types

type Dialer

type Dialer interface {
	DialContext(ctx context.Context) (conn net.Conn, e error)
	Close() error
}

type Network

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

func New

func New() *Network

func (*Network) Dialer

func (n *Network) Dialer(network string, addr string, cfg *tls.Config) (dialer Dialer, e error)

func (*Network) Listen

func (n *Network) Listen(network, address string) (l net.Listener, e error)

func (*Network) ListenTLS

func (n *Network) ListenTLS(network, address string, config *tls.Config) (l net.Listener, e error)

func (*Network) ListenUdp added in v0.0.4

func (n *Network) ListenUdp(network, address string, opts *config.UDP, pool *pool.Pool) (l net.Listener, e error)

func (*Network) NewPortal

func (n *Network) NewPortal(log *slog.Logger, l net.Listener, portal *config.Portal) (dialer *reverse.Dialer, e error)

Jump to

Keyboard shortcuts

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