Home | History | Annotate | Download | only in net

Lines Matching refs:network

41 	// network being dialed.
46 // when the network is "tcp" and the destination is a host name
57 // network connection.
58 // If zero, keep-alives are not enabled. Network protocols
169 func (r *Resolver) resolveAddrList(ctx context.Context, op, network, addr string, hint Addr) (addrList, error) {
170 afnet, _, err := parseNetwork(ctx, network)
183 if op == "dial" && hint != nil && addr.Network() != hint.Network() {
211 if addr.Network() != hint.Network() {
238 // Dial connects to the address on the named network.
259 // For IP networks, the network must be "ip", "ip4" or "ip6" followed
271 func Dial(network, address string) (Conn, error) {
273 return d.Dial(network, address)
278 func DialTimeout(network, address string, timeout time.Duration) (Conn, error) {
280 return d.Dial(network, address)
286 network, address string
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) {
294 return d.DialContext(context.Background(), network, address)
297 // DialContext connects to the address on the named network using
306 // network addresses, any dial timeout (from d.Timeout or ctx) is spread
313 // See func Dial for a description of the network and address
315 func (d *Dialer) DialContext(ctx context.Context, network, address string) (Conn, error) {
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}
356 network: network,
361 if d.DualStack && network == "tcp" {
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}
511 trace.ConnectStart(dp.network, raStr)
514 defer func() { trace.ConnectDone(dp.network, raStr, err) }()
521 c, err = dialTCP(ctx, dp.network, la, ra)
524 c, err = dialUDP(ctx, dp.network, la, ra)
527 c, err = dialIP(ctx, dp.network, la, ra)
530 c, err = dialUnix(ctx, dp.network, la, ra)
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
540 // Listen announces on the local network address laddr.
541 // The network net must be a stream-oriented network: "tcp", "tcp4",
570 // ListenPacket announces on the local network address laddr.
571 // The network net must be a packet-oriented network: "udp", "udp4",