Lines Matching refs:dial
17 // is therefore equivalent to just calling the Dial function.
19 // Timeout is the maximum amount of time a dial will wait for
66 // the dial should be canceled. Not all types of dials support
174 if op == "dial" && addr == "" {
183 if op == "dial" && hint != nil && addr.Network() != hint.Network() {
189 if err != nil || op != "dial" || hint == nil {
238 // Dial connects to the address on the named network.
253 // Dial("tcp", "192.0.2.1:80")
254 // Dial("tcp", "golang.org:http")
255 // Dial("tcp", "[2001:db8::1]:http")
256 // Dial("tcp", "[fe80::1%lo0]:80")
257 // Dial("tcp", ":80")
264 // Dial("ip4:1", "192.0.2.1")
265 // Dial("ip6:ipv6-icmp", "2001:db8::1")
270 // Dial will try each address in order until one succeeds.
271 func Dial(network, address string) (Conn, error) {
273 return d.Dial(network, address)
276 // DialTimeout acts like Dial but takes a timeout.
280 return d.Dial(network, address)
283 // dialParam contains a Dial's parameters and configuration.
289 // Dial connects to the address on the named network.
291 // See func Dial for a description of the network and address
293 func (d *Dialer) Dial(network, address string) (Conn, error) {
306 // network addresses, any dial timeout (from d.Timeout or ctx) is spread
307 // over each consecutive dial, such that each is given an appropriate
313 // See func Dial for a description of the network and address
349 addrs, err := d.resolver().resolveAddrList(resolveCtx, "dial", network, address, d.LocalAddr)
351 return nil, &OpError{Op: "dial", Net: network, Source: nil, Addr: nil, Err: err}
469 return nil, &OpError{Op: "dial", Net: dp.network, Source: dp.LocalAddr, Addr: ra, Err: mapErr(ctx.Err())}
478 firstErr = &OpError{Op: "dial", Net: dp.network, Source: dp.LocalAddr, Addr: ra, Err: err}
499 firstErr = &OpError{Op: "dial", Net: dp.network, Source: nil, Addr: nil, Err: errMissingAddress}
532 return nil, &OpError{Op: "dial", Net: dp.network, Source: la, Addr: ra, Err: &AddrError{Err: "unexpected address type", Addr: dp.address}}
535 return nil, &OpError{Op: "dial", Net: dp.network, Source: la, Addr: ra, Err: err} // c is non-nil interface containing nil pointer
546 // See Dial for more details about address syntax.
576 // See Dial for the syntax of laddr.