Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 139 for dtoi (0.05 sec)

  1. src/net/lookup_plan9.go

    		return "", nil, handlePlan9DNSError(err, name)
    	}
    	for _, line := range lines {
    		f := getFields(line)
    		if len(f) < 6 {
    			continue
    		}
    		port, _, portOk := dtoi(f[4])
    		priority, _, priorityOk := dtoi(f[3])
    		weight, _, weightOk := dtoi(f[2])
    		if !(portOk && priorityOk && weightOk) {
    			continue
    		}
    		addrs = append(addrs, &SRV{absDomainName(f[5]), uint16(port), uint16(priority), uint16(weight)})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 17:08:38 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  2. src/net/interface_plan9.go

    	}
    
    	fields := getFields(line)
    	if len(fields) < 4 {
    		return nil, errors.New("invalid interface status file: " + ifcstat)
    	}
    
    	device := fields[1]
    	mtustr := fields[3]
    
    	mtu, _, ok := dtoi(mtustr)
    	if !ok {
    		return nil, errors.New("invalid status file of interface: " + ifcstat)
    	}
    	ifc.MTU = mtu
    
    	// Not a loopback device ("/dev/null") or packet interface (e.g. "pkt2")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 14:00:54 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  3. src/net/dnsconfig_unix.go

    					n, _, _ := dtoi(s[6:])
    					if n < 0 {
    						n = 0
    					} else if n > 15 {
    						n = 15
    					}
    					conf.ndots = n
    				case stringslite.HasPrefix(s, "timeout:"):
    					n, _, _ := dtoi(s[8:])
    					if n < 1 {
    						n = 1
    					}
    					conf.timeout = time.Duration(n) * time.Second
    				case stringslite.HasPrefix(s, "attempts:"):
    					n, _, _ := dtoi(s[9:])
    					if n < 1 {
    						n = 1
    					}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 02 22:14:43 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  4. src/net/lookup_windows_test.go

    	rx := regexp.MustCompile(`(?m)^([a-z0-9.\-]+)\s+mail exchanger\s*=\s*([0-9]+)\s*([a-z0-9.\-]+)$`)
    	for _, ans := range rx.FindAllStringSubmatch(r, -1) {
    		pref, _, _ := dtoi(ans[2])
    		mx = append(mx, &MX{absDomainName(ans[3]), uint16(pref)})
    	}
    	// windows nslookup syntax
    	// gmail.com       MX preference = 30, mail exchanger = alt3.gmail-smtp-in.l.google.com
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  5. src/net/parse.go

    // Bigger than we need, not too big to worry about overflow
    const big = 0xFFFFFF
    
    // Decimal to integer.
    // Returns number, characters consumed, success.
    func dtoi(s string) (n int, i int, ok bool) {
    	n = 0
    	for i = 0; i < len(s) && '0' <= s[i] && s[i] <= '9'; i++ {
    		n = n*10 + int(s[i]-'0')
    		if n >= big {
    			return big, i, false
    		}
    	}
    	if i == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 14:00:54 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  6. src/net/interface.go

    	zoneCache.RUnlock()
    	if !ok && !updated {
    		zoneCache.update(nil, true)
    		zoneCache.RLock()
    		index, ok = zoneCache.toIndex[name]
    		zoneCache.RUnlock()
    	}
    	if !ok { // last resort
    		index, _, _ = dtoi(name)
    	}
    	return index
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:53 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  7. src/net/conf.go

    // etc.
    func goDebugNetDNS() (dnsMode string, debugLevel int) {
    	goDebug := netdns.Value()
    	parsePart := func(s string) {
    		if s == "" {
    			return
    		}
    		if '0' <= s[0] && s[0] <= '9' {
    			debugLevel, _, _ = dtoi(s)
    		} else {
    			dnsMode = s
    		}
    	}
    	if i := bytealg.IndexByteString(goDebug, '+'); i != -1 {
    		parsePart(goDebug[:i])
    		parsePart(goDebug[i+1:])
    		return
    	}
    	parsePart(goDebug)
    	return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 18 03:13:26 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  8. src/net/ip.go

    	}
    
    	ipAddr, err := netip.ParseAddr(addr)
    	if err != nil || ipAddr.Zone() != "" {
    		return nil, nil, &ParseError{Type: "CIDR address", Text: s}
    	}
    
    	n, i, ok := dtoi(mask)
    	if !ok || i != len(mask) || n < 0 || n > ipAddr.BitLen() {
    		return nil, nil, &ParseError{Type: "CIDR address", Text: s}
    	}
    	m := CIDRMask(n, ipAddr.BitLen())
    	addr16 := ipAddr.As16()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 18 03:13:26 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  9. src/strconv/atoi.go

    		return -int64(cutoff), rangeError(fnParseInt, s0)
    	}
    	n := int64(un)
    	if neg {
    		n = -n
    	}
    	return n, nil
    }
    
    // Atoi is equivalent to ParseInt(s, 10, 0), converted to type int.
    func Atoi(s string) (int, error) {
    	const fnAtoi = "Atoi"
    
    	sLen := len(s)
    	if intSize == 32 && (0 < sLen && sLen < 10) ||
    		intSize == 64 && (0 < sLen && sLen < 19) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 05 00:24:26 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  10. docs/vi/docs/index.md

    * <abbr title="cũng được biết tới như: serialization, parsing, marshalling">Chuyển đổi</abbr> dữ liệu đầu vào: tới từ network sang dữ liệu kiểu Python. Đọc từ:
        * JSON.
        * Các tham số trong đường dẫn.
        * Các tham số trong query string.
        * Cookies.
        * Headers.
        * Forms.
        * Files.
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Mon Apr 29 05:18:04 UTC 2024
    - 21.9K bytes
    - Viewed (0)
Back to top