Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for lookupPort (0.12 sec)

  1. src/net/lookup.go

    		s[i] = v
    	}
    	return s
    }
    
    // LookupPort looks up the port for the given network and service.
    //
    // LookupPort uses [context.Background] internally; to specify the context, use
    // [Resolver.LookupPort].
    func LookupPort(network, service string) (port int, err error) {
    	return DefaultResolver.LookupPort(context.Background(), network, service)
    }
    
    // LookupPort looks up the port for the given network and service.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:23:45 UTC 2024
    - 28.6K bytes
    - Viewed (0)
  2. src/net/lookup_test.go

    				_, err := LookupCNAME(testNXDOMAIN)
    				return err
    			},
    		},
    		{
    			name: "LookupHost NXDOMAIN",
    			query: func() error {
    				_, err := LookupHost(testNXDOMAIN)
    				return err
    			},
    		},
    		{
    			name: "LookupHost NODATA",
    			query: func() error {
    				_, err := LookupHost(testNODATA)
    				return err
    			},
    		},
    		{
    			name: "LookupMX NXDOMAIN",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 41.4K bytes
    - Viewed (0)
  3. src/net/port_unix.go

    			services[netw] = m
    		}
    		for i := 0; i < len(f); i++ {
    			if i != 1 { // f[1] was port/net
    				m[f[i]] = port
    			}
    		}
    	}
    }
    
    // goLookupPort is the native Go implementation of LookupPort.
    func goLookupPort(network, service string) (port int, err error) {
    	onceReadServices.Do(readServices)
    	return lookupPortMap(network, service)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  4. cmd/kubeadm/app/apis/kubeadm/apiendpoint.go

    	}
    	if netutils.ParseIPSloppy(apiEndpointHost) == nil {
    		return APIEndpoint{}, errors.Errorf("invalid API endpoint IP: %s", apiEndpointHost)
    	}
    	apiEndpointPort, err := net.LookupPort("tcp", apiEndpointPortStr)
    	if err != nil {
    		return APIEndpoint{}, errors.Wrapf(err, "invalid advertise address endpoint port: %s", apiEndpointPortStr)
    	}
    	return APIEndpoint{
    		AdvertiseAddress: apiEndpointHost,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 20 08:42:09 UTC 2021
    - 1.6K bytes
    - Viewed (0)
  5. src/net/lookup_unix.go

    	if order == hostLookupCgo {
    		return cgoLookupIP(ctx, network, host)
    	}
    	ips, _, err := r.goLookupIPCNAMEOrder(ctx, network, host, order, conf)
    	return ips, err
    }
    
    func (r *Resolver) lookupPort(ctx context.Context, network, service string) (int, error) {
    	// Port lookup is not a DNS operation.
    	// Prefer the cgo resolver if possible.
    	if !systemConf().mustUseGoResolver(r) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  6. src/net/lookup_plan9.go

    	}
    
    	lits, err := r.lookupHost(ctx, host)
    	if err != nil {
    		return
    	}
    	for _, lit := range lits {
    		host, zone := splitHostZone(lit)
    		if ip := ParseIP(host); ip != nil {
    			addr := IPAddr{IP: ip, Zone: zone}
    			addrs = append(addrs, addr)
    		}
    	}
    	return
    }
    
    func (r *Resolver) lookupPort(ctx context.Context, network, service string) (port int, err error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 17:08:38 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  7. src/net/ipsock.go

    	)
    	switch net {
    	case "tcp", "tcp4", "tcp6", "udp", "udp4", "udp6":
    		if addr != "" {
    			if host, port, err = SplitHostPort(addr); err != nil {
    				return nil, err
    			}
    			if portnum, err = r.LookupPort(ctx, net, port); err != nil {
    				return nil, err
    			}
    		}
    	case "ip", "ip4", "ip6":
    		if addr != "" {
    			host = addr
    		}
    	default:
    		return nil, UnknownNetworkError(net)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  8. src/net/lookup_windows.go

    		// newLookupIP, and newerLookUP.
    		//
    		// For now we just let it finish and write to the
    		// buffered channel.
    		return nil, newDNSError(mapErr(ctx.Err()), name, "")
    	}
    }
    
    func (r *Resolver) lookupPort(ctx context.Context, network, service string) (int, error) {
    	if systemConf().mustUseGoResolver(r) {
    		return lookupPortMap(network, service)
    	}
    
    	// TODO(bradfitz): finish ctx plumbing
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:23:45 UTC 2024
    - 14.2K bytes
    - Viewed (0)
  9. api/go1.8.txt

    pkg net, method (*Resolver) LookupHost(context.Context, string) ([]string, error)
    pkg net, method (*Resolver) LookupIPAddr(context.Context, string) ([]IPAddr, error)
    pkg net, method (*Resolver) LookupMX(context.Context, string) ([]*MX, error)
    pkg net, method (*Resolver) LookupNS(context.Context, string) ([]*NS, error)
    pkg net, method (*Resolver) LookupPort(context.Context, string, string) (int, error)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 21 05:25:57 UTC 2016
    - 16.3K bytes
    - Viewed (0)
  10. internal/http/dial_dnscache.go

    	"context"
    	"net"
    	"time"
    )
    
    // LookupHost is a function to make custom lookupHost for optional cached DNS requests
    type LookupHost func(ctx context.Context, host string) (addrs []string, err error)
    
    // DialContextWithLookupHost is a helper function which returns `net.DialContext` function.
    // It randomly fetches an IP via custom LookupHost function and dials it by the given dial
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jul 03 19:30:51 UTC 2023
    - 2.6K bytes
    - Viewed (0)
Back to top