bootstrap

package
v5.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBootstrap

func NewBootstrap(s string) *net.Resolver

NewBootstrap returns a customized *net.Resolver which can be used as a Bootstrap for a certain domain. Its Dial func is modified to dial s through udp. It also has a small built-in cache. s SHOULD be a literal IP address and the port SHOULD also be literal. Port can be omitted. In this case, the default port is :53. e.g. NewBootstrap("8.8.8.8"), NewBootstrap("127.0.0.1:5353"). If s is empty, NewBootstrap returns nil. (A nil *net.Resolver is valid in net.Dialer.) Note that not all platform support a customized *net.Resolver. It also depends on the version of go runtime. See the package docs from the net package for more info.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL