Documentation ¶
Overview ¶
Package tcp provides tcp option
Package tcp provides tcp option ¶
Package tcp provides tcp option
Index ¶
- Constants
- func Control(network, address string, c syscall.RawConn) (err error)
- type Dialer
- type DialerOption
- func WithCache(c cache.Cache) DialerOption
- func WithDNSCacheExpiration(dur string) DialerOption
- func WithDNSRefreshDuration(dur string) DialerOption
- func WithDialerKeepAlive(dur string) DialerOption
- func WithDialerTimeout(dur string) DialerOption
- func WithDisableDNSCache() DialerOption
- func WithDisableDialerDualStack() DialerOption
- func WithEnableDNSCache() DialerOption
- func WithEnableDialerDualStack() DialerOption
- func WithTLS(cfg *tls.Config) DialerOption
Constants ¶
View Source
const TCP_FASTOPEN int = 0x17
Variables ¶
This section is empty.
Functions ¶
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
Click to show internal directories.
Click to hide internal directories.