Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 37 for addReport (0.12 sec)

  1. src/net/udpsock_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	defer conn.Close()
    	addr := conn.LocalAddr()
    	addrPort := addr.(*UDPAddr).AddrPort()
    	buf := make([]byte, 8)
    
    	allocs := testing.AllocsPerRun(1000, func() {
    		_, _, err := conn.WriteMsgUDPAddrPort(buf, nil, addrPort)
    		if err != nil {
    			t.Fatal(err)
    		}
    		_, _, _, _, err = conn.ReadMsgUDPAddrPort(buf, nil)
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 17.2K bytes
    - Viewed (0)
  2. src/net/netip/netip_pkg_test.go

    	}
    }
    
    func TestParseAddrPort(t *testing.T) {
    	tests := []struct {
    		in      string
    		want    AddrPort
    		wantErr bool
    	}{
    		{in: "1.2.3.4:1234", want: AddrPort{mustIP("1.2.3.4"), 1234}},
    		{in: "1.1.1.1:123456", wantErr: true},
    		{in: "1.1.1.1:-123", wantErr: true},
    		{in: "[::1]:1234", want: AddrPort{mustIP("::1"), 1234}},
    		{in: "[1.2.3.4]:1234", wantErr: true},
    		{in: "fe80::1:1234", wantErr: true},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 02 15:37:19 UTC 2023
    - 9K bytes
    - Viewed (0)
  3. src/net/netip/netip.go

    }
    
    // AddrPort is an IP and a port number.
    type AddrPort struct {
    	ip   Addr
    	port uint16
    }
    
    // AddrPortFrom returns an [AddrPort] with the provided IP and port.
    // It does not allocate.
    func AddrPortFrom(ip Addr, port uint16) AddrPort { return AddrPort{ip: ip, port: port} }
    
    // Addr returns p's IP address.
    func (p AddrPort) Addr() Addr { return p.ip }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 17:10:01 UTC 2024
    - 43.2K bytes
    - Viewed (0)
  4. src/net/udpsock_posix.go

    		}
    	}
    	if err != nil {
    		// No sockaddr, so don't return UDPAddr.
    		addr = nil
    	}
    	return n, addr, err
    }
    
    func (c *UDPConn) readFromAddrPort(b []byte) (n int, addr netip.AddrPort, err error) {
    	var ip netip.Addr
    	var port int
    	switch c.fd.family {
    	case syscall.AF_INET:
    		var from syscall.SockaddrInet4
    		n, err = c.fd.readFromInet4(b, &from)
    		if err == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:54:32 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  5. src/cmd/fix/import_test.go

    	"f"
    	"z"
    )
    `,
    	},
    }
    
    func addImportFn(path ...string) func(*ast.File) bool {
    	return func(f *ast.File) bool {
    		fixed := false
    		for _, p := range path {
    			if !imports(f, p) {
    				addImport(f, p)
    				fixed = true
    			}
    		}
    		return fixed
    	}
    }
    
    func deleteImportFn(path string) func(*ast.File) bool {
    	return func(f *ast.File) bool {
    		if imports(f, path) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 23:34:33 UTC 2016
    - 5K bytes
    - Viewed (0)
  6. src/net/netip/netip_test.go

    	if got != want {
    		t.Errorf("unexpected sort\n got: %s\nwant: %s\n", got, want)
    	}
    }
    
    func TestAddrPortCompare(t *testing.T) {
    	tests := []struct {
    		a, b AddrPort
    		want int
    	}{
    		{AddrPort{}, AddrPort{}, 0},
    		{AddrPort{}, mustIPPort("1.2.3.4:80"), -1},
    
    		{mustIPPort("1.2.3.4:80"), mustIPPort("1.2.3.4:80"), 0},
    		{mustIPPort("[::1]:80"), mustIPPort("[::1]:80"), 0},
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 17:10:01 UTC 2024
    - 54.3K bytes
    - Viewed (0)
  7. src/net/tcpsock.go

    	IP   IP
    	Port int
    	Zone string // IPv6 scoped addressing zone
    }
    
    // AddrPort returns the [TCPAddr] a as a [netip.AddrPort].
    //
    // If a.Port does not fit in a uint16, it's silently truncated.
    //
    // If a is nil, a zero value is returned.
    func (a *TCPAddr) AddrPort() netip.AddrPort {
    	if a == nil {
    		return netip.AddrPort{}
    	}
    	na, _ := netip.AddrFromSlice(a.IP)
    	na = na.WithZone(a.Zone)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 03:10:07 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  8. src/cmd/internal/test2json/testdata/framefuzz.test

        inlining_test.go:102: not in expected set, but also inlinable: "bePutUint64"
        inlining_test.go:102: not in expected set, but also inlinable: "mask6"
        inlining_test.go:102: not in expected set, but also inlinable: "AddrPort.isZero"
        inlining_test.go:102: not in expected set, but also inlinable: "stringsLastIndexByte"
        inlining_test.go:102: not in expected set, but also inlinable: "Addr.isZero"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 26 19:50:36 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  9. pkg/test/framework/components/istio/ingress/interface.go

    	// DiscoveryAddresses returns the external XDS (15012) address on the ingress gateway (or the NodePort address,
    	// when in an environment that doesn't support LoadBalancer).
    	DiscoveryAddresses() []netip.AddrPort
    	// AddressesForPort returns the external address of the ingress gateway (or the NodePort address,
    	// when in an environment that doesn't support LoadBalancer) for the given port.
    	AddressesForPort(port int) ([]string, []int)
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Feb 29 17:13:34 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  10. pkg/test/framework/components/istio/kube.go

    		if err != nil {
    			return netip.AddrPort{}, err
    		}
    		addr = address.(netip.AddrPort)
    	} else {
    		name := types.NamespacedName{Name: eastWestIngressServiceName, Namespace: i.cfg.SystemNamespace}
    		addr = i.CustomIngressFor(primary, name, eastWestIngressIstioLabel).DiscoveryAddresses()[0]
    	}
    	if !addr.IsValid() {
    		return netip.AddrPort{}, fmt.Errorf("failed to get ingress IP for %s", primary.Name())
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 22:12:34 UTC 2024
    - 31.1K bytes
    - Viewed (0)
Back to top