1 // Copyright 2024 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4 5 //:build js && wasm
6 7 // rawLookupHost reports that the raw UDP resolver is unavailable, which is the
8 // truth on js/wasm: there are no sockets (syscall.Socket and friends all return
9 // ENOSYS) and no syscall.SetsockoptTimeval at all.
10 //
11 // rawdns.mx, the real one, is `//:build unix`. Its two callers
12 // (lookup_unix.mx:69 and dnsclient_unix.mx:556) use it only as a fallback when
13 // the standard resolver returned nothing:
14 //
15 // if len(addrs) == 0 {
16 // if raw := rawLookupHost(host); len(raw) > 0 {
17 // return raw, nil
18 // }
19 // }
20 //
21 // so returning nil here leaves them exactly as they were, minus a fallback that
22 // could never have worked.
23 package net
24 25 func rawLookupHost(host string) (rbyte [][]byte) {
26 return nil
27 }
28