DialWithDialer connects to the given network address using dialer.Dial and then initiates a TLS handshake, returning the resulting TLS connection. Any timeout or deadline given in the dialer apply to connection and TLS handshake as a whole. DialWithDialer interprets a nil configuration as equivalen
(dialer *net.Dialer, network, addr string, config *Config)
| 114 | // DialWithDialer uses context.Background internally; to specify the context, |
| 115 | // use Dialer.DialContext with NetDialer set to the desired dialer. |
| 116 | func DialWithDialer(dialer *net.Dialer, network, addr string, config *Config) (*Conn, error) { |
| 117 | return dial(context.Background(), dialer, network, addr, config) |
| 118 | } |
| 119 | |
| 120 | func dial(ctx context.Context, netDialer *net.Dialer, network, addr string, config *Config) (*Conn, error) { |
| 121 | if netDialer.Timeout != 0 { |