tcp

package
v0.0.37 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package tcp provides tcp option

Package tcp provides tcp option

Package tcp provides tcp option

Index

Constants

View Source
const TCP_FASTOPEN int = 0x17

Variables

This section is empty.

Functions

func Control

func Control(network, address string, c syscall.RawConn) (err error)

Types

type Dialer

type Dialer interface {
	GetDialer() func(ctx context.Context, network, addr string) (net.Conn, error)
	StartDialerCache(ctx context.Context)
	DialContext(ctx context.Context, network, address string) (net.Conn, error)
}

func NewDialer

func NewDialer(opts ...DialerOption) (der Dialer, err error)

type DialerOption

type DialerOption func(*dialer)

func WithCache

func WithCache(c cache.Cache) DialerOption

func WithDNSCacheExpiration

func WithDNSCacheExpiration(dur string) DialerOption

func WithDNSRefreshDuration

func WithDNSRefreshDuration(dur string) DialerOption

func WithDialerKeepAlive

func WithDialerKeepAlive(dur string) DialerOption

func WithDialerTimeout

func WithDialerTimeout(dur string) DialerOption

func WithDisableDNSCache

func WithDisableDNSCache() DialerOption

func WithDisableDialerDualStack

func WithDisableDialerDualStack() DialerOption

func WithEnableDNSCache

func WithEnableDNSCache() DialerOption

func WithEnableDialerDualStack

func WithEnableDialerDualStack() DialerOption

func WithTLS

func WithTLS(cfg *tls.Config) DialerOption

Jump to

Keyboard shortcuts

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