Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for favoriteAddrFamily (0.15 sec)

  1. src/net/ipsock_posix.go

    //
    // Do not remove or change the type signature.
    // See go.dev/issue/67401.
    //
    //go:linkname favoriteAddrFamily
    func favoriteAddrFamily(network string, laddr, raddr sockaddr, mode string) (family int, ipv6only bool) {
    	switch network[len(network)-1] {
    	case '4':
    		return syscall.AF_INET, false
    	case '6':
    		return syscall.AF_INET6, true
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  2. src/net/platform_test.go

    	// sockets.
    	if !supportsIPv4map() && supportsIPv4() && (network == "tcp" || network == "udp" || network == "ip") && wildcard {
    		// At this point, we prefer IPv4 when ip is nil.
    		// See favoriteAddrFamily for further information.
    		if ip.To16() != nil && ip.To4() == nil && cip.To4() != nil { // a pair of IPv6 server and IPv4 client
    			return false
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 4.3K bytes
    - Viewed (0)
Back to top