simple

package
v0.3.1-beta Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2022 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LookupIP

func LookupIP(resolver *net.Resolver, host string) ([]net.IP, error)

LookupIP looks up host using the local resolver. It returns a slice of that host's IPv4 and IPv6 addresses.

func WithLookupIP

func WithLookupIP(f func(host string) ([]net.IP, error)) func(*Simple)

func WithTLS

func WithTLS(t *tls.Config) func(*Simple)

Types

type Simple

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

Simple .

func NewSimple

func NewSimple(address, port string, opts ...func(*Simple)) *Simple

NewSimple .

func (*Simple) Conn

func (c *Simple) Conn(host string) (net.Conn, error)

func (*Simple) PacketConn

func (c *Simple) PacketConn(host string) (net.PacketConn, error)

Jump to

Keyboard shortcuts

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