Dial connects to the address addr on the given network through either defaultDialer or bypass.
(network, addr string)
| 35 | // Dial connects to the address addr on the given network through either |
| 36 | // defaultDialer or bypass. |
| 37 | func (p *PerHost) Dial(network, addr string) (c net.Conn, err error) { |
| 38 | host, _, err := net.SplitHostPort(addr) |
| 39 | if err != nil { |
| 40 | return nil, err |
| 41 | } |
| 42 | |
| 43 | return p.dialerForRequest(host).Dial(network, addr) |
| 44 | } |
| 45 | |
| 46 | // DialContext connects to the address addr on the given network through either |
| 47 | // defaultDialer or bypass. |