Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for LookupHost (0.13 sec)

  1. cmd/server-main.go

    		if host != "" {
    			if net.ParseIP(host) != nil {
    				ip = host
    			} else {
    				ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
    				defer cancel()
    
    				haddrs, err := globalDNSCache.LookupHost(ctx, host)
    				if err == nil {
    					ip = haddrs[0]
    				}
    			}
    		}
    		ifs, _ := net.Interfaces()
    		for _, interf := range ifs {
    			addrs, err := interf.Addrs()
    			if err == nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 15:54:03 GMT 2024
    - 34.9K bytes
    - Viewed (1)
Back to top