ExchangeWithDialer does not exist anymore (#666)

This commit is contained in:
Eric Greer 2018-04-06 04:05:09 -07:00 committed by Miek Gieben
parent 83c435cc65
commit 46f728d51b
1 changed files with 2 additions and 2 deletions

4
doc.go
View File

@ -73,11 +73,11 @@ and port to use for the connection:
Port: 12345,
Zone: "",
}
d := net.Dialer{
c.Dialer := &net.Dialer{
Timeout: 200 * time.Millisecond,
LocalAddr: &laddr,
}
in, rtt, err := c.ExchangeWithDialer(&d, m1, "8.8.8.8:53")
in, rtt, err := c.Exchange(m1, "8.8.8.8:53")
If these "advanced" features are not needed, a simple UDP query can be sent,
with: