mirror of
https://github.com/miekg/dns.git
synced 2025-10-13 10:51:02 +02:00
doc updates
This commit is contained in:
parent
55c41c82b7
commit
ac0f4afcc9
6
dns.go
6
dns.go
@ -119,7 +119,8 @@ func Dial(n, laddr, raddr string) (*Conn, os.Error) {
|
|||||||
return d, nil
|
return d, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fill in a Conn from a TCPConn
|
// Fill in a Conn from a TCPConn. If a is nil, the
|
||||||
|
// remote address in the connection is used.
|
||||||
func (d *Conn) SetTCPConn(l *net.TCPConn, a net.Addr) {
|
func (d *Conn) SetTCPConn(l *net.TCPConn, a net.Addr) {
|
||||||
d.TCP = l
|
d.TCP = l
|
||||||
d.UDP = nil
|
d.UDP = nil
|
||||||
@ -129,7 +130,8 @@ func (d *Conn) SetTCPConn(l *net.TCPConn, a net.Addr) {
|
|||||||
d.Port = d.Addr.(*net.TCPAddr).Port
|
d.Port = d.Addr.(*net.TCPAddr).Port
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fill in a Conn from a UDPConn
|
// Fill in a Conn from a TCPConn. If a is nil, the
|
||||||
|
// remote address in the connection is used.
|
||||||
func (d *Conn) SetUDPConn(l *net.UDPConn, a net.Addr) {
|
func (d *Conn) SetUDPConn(l *net.UDPConn, a net.Addr) {
|
||||||
d.TCP = nil
|
d.TCP = nil
|
||||||
d.UDP = l
|
d.UDP = l
|
||||||
|
Loading…
x
Reference in New Issue
Block a user