dialers

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: LGPL-2.1 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TcpDialer

type TcpDialer struct {
	Timeout   time.Duration `default:"2m"`
	KeepAlive time.Duration `default:"15s"`
	Control   func(network, address string, c syscall.RawConn) error
}

Implemets options for connecting to tcp/ip address with some extra features

func (*TcpDialer) Dial

func (d *TcpDialer) Dial(uri url.URL, proxy *url.URL) (net.Conn, error)

Dial connects to the address by url with optional using proxy (if not nil). It also drops ygg over ygg connections.

func (*TcpDialer) DialContext

func (d *TcpDialer) DialContext(ctx context.Context, uri url.URL, proxy_uri *url.URL) (net.Conn, error)

Dial connects to the address by url with optional using proxy (if not nil). It also drops ygg over ygg connections. It also accepts a context that allows you to cancel the process of settling ahead of time.

Jump to

Keyboard shortcuts

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