conn

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextDialer

type ContextDialer = func(ctx context.Context, network, address string) (net.Conn, error)

type Factory

type Factory interface {
	DialContext(ctx context.Context) (net.Conn, error)
}

type PlainConnFactory

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

func NewPlainConnFactory

func NewPlainConnFactory(host string, port uint16, dialer ContextDialer) *PlainConnFactory

func (*PlainConnFactory) DialContext

func (cf *PlainConnFactory) DialContext(ctx context.Context) (net.Conn, error)

type TLSConnFactory

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

func NewTLSConnFactory

func NewTLSConnFactory(host string, port uint16, dialer ContextDialer,
	certfile, keyfile string, cafile string, hostname_check bool,
	tls_servername string, dialers uint, sessionCache tls.ClientSessionCache, logger *clog.CondLogger) (*TLSConnFactory, error)

func (*TLSConnFactory) DialContext

func (cf *TLSConnFactory) DialContext(ctx context.Context) (net.Conn, error)

Jump to

Keyboard shortcuts

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