more complete PR for adding more net support (#64)

This commit is contained in:
Pat Whittingslow
2026-07-03 17:04:17 -03:00
committed by GitHub
parent 2e825c2b01
commit ffb222f1ad
8 changed files with 350 additions and 1 deletions
+23
View File
@@ -124,5 +124,28 @@ func (r *Resolver) LookupPort(ctx context.Context, network, service string) (por
return 0, errors.New("net:LookupPort not implemented")
}
// An SRV represents a single DNS SRV record.
type SRV struct {
Target string
Port uint16
Priority uint16
Weight uint16
}
// LookupSRV tries to resolve an SRV query of the given service, protocol, and
// domain name.
//
// TINYGO: not implemented; netdev provides no SRV record lookup.
func (r *Resolver) LookupSRV(ctx context.Context, service, proto, name string) (string, []*SRV, error) {
return "", nil, errors.New("net:LookupSRV not implemented")
}
// LookupTXT returns the DNS TXT records for the given domain name.
//
// TINYGO: not implemented; netdev provides no TXT record lookup.
func (r *Resolver) LookupTXT(ctx context.Context, name string) ([]string, error) {
return nil, errors.New("net:LookupTXT not implemented")
}
// errNoSuchHost is returned when the host lookup finds no matching records.
var errNoSuchHost = errors.New("no such host")