Versions in this module Expand all Collapse all v0 v0.5.1 Sep 30, 2024 Changes in this version + const DefaultAfterHookPriority + func Dial(addr string, opts ...DialOption) (c net.Conn, err error) + func DialContext(ctx context.Context, addr string, opts ...DialOption) (c net.Conn, err error) + type AfterHook struct + Hook AfterHookFunc + Priority uint64 + type AfterHookFunc func(ctx context.Context, c net.Conn, addr string) (context.Context, net.Conn, error) + type BeforeHook struct + Hook BeforeHookFunc + type BeforeHookFunc func(ctx context.Context, addr string) context.Context + type DialMetas map[interface{}]interface + func (m DialMetas) Value(key interface{}) interface{} + func GetDialMetasFromContext(ctx context.Context) DialMetas + type DialOption interface + func WithAfterHook(hook AfterHook) DialOption + func WithKeepAlive(keepAlive time.Duration) DialOption + func WithLocalAddr(laddr string) DialOption + func WithProtocol(protocol string) DialOption + func WithProxy(proxyType string, address string) DialOption + func WithProxyAuth(auth *ProxyAuth) DialOption + func WithTLSConfig(tlsConfig *tls.Config) DialOption + func WithTLSConfigAndPriority(priority uint64, tlsConfig *tls.Config) DialOption + func WithTimeout(timeout time.Duration) DialOption + type ProxyAuth struct + Passwd string + Username string + func ParseProxyURL(proxyURL string) (proxyType string, address string, auth *ProxyAuth, err error) + type SharedConn struct + func NewSharedConn(conn net.Conn) (*SharedConn, io.Reader) + func NewSharedConnSize(conn net.Conn, bufSize int) (*SharedConn, io.Reader) + func (sc *SharedConn) Read(p []byte) (n int, err error) + func (sc *SharedConn) ResetBuf(buffer []byte) (err error)