Lines Matching refs:network
22 for _, network := range []string{"tcp", "tcp4", "tcp6"} {
23 addr, err := ResolveTCPAddr(network, "www.google.com:http")
29 case network == "tcp" && addr.IP.To4() == nil:
31 case network == "tcp4" && addr.IP.To4() == nil:
32 t.Errorf("got %v; want an IPv4 address on %s", addr, network)
33 case network == "tcp6" && (addr.IP.To16() == nil || addr.IP.To4() != nil):
34 t.Errorf("got %v; want an IPv6 address on %s", addr, network)
75 for _, network := range tt.networks {
78 if err := fetchGoogle(tt.dial, network, addr); err != nil {
147 func fetchGoogle(dial func(string, string) (Conn, error), network, address string) error {
148 c, err := dial(network, address)
163 return fmt.Errorf("short read from %s:%s->%s", network, c.RemoteAddr(), c.LocalAddr())