summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/miekg/dns/udp_windows.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-09-29 12:46:30 -0700
committerGitHub <noreply@github.com>2017-09-29 12:46:30 -0700
commitb84736e9b6401df0c6eeab9950bef09458a6aefd (patch)
treed9175208de3236db75a33879750a57b3000ba096 /vendor/github.com/miekg/dns/udp_windows.go
parent8b9dbb86133ff0fd6002a391268383d1593918ca (diff)
downloadchat-b84736e9b6401df0c6eeab9950bef09458a6aefd.tar.gz
chat-b84736e9b6401df0c6eeab9950bef09458a6aefd.tar.bz2
chat-b84736e9b6401df0c6eeab9950bef09458a6aefd.zip
Updating server dependancies. (#7538)
Diffstat (limited to 'vendor/github.com/miekg/dns/udp_windows.go')
-rw-r--r--vendor/github.com/miekg/dns/udp_windows.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/github.com/miekg/dns/udp_windows.go b/vendor/github.com/miekg/dns/udp_windows.go
index 51e532ac2..2ad4ede7f 100644
--- a/vendor/github.com/miekg/dns/udp_windows.go
+++ b/vendor/github.com/miekg/dns/udp_windows.go
@@ -4,10 +4,12 @@ package dns
import "net"
+// SessionUDP holds the remote address
type SessionUDP struct {
raddr *net.UDPAddr
}
+// RemoteAddr returns the remote network address.
func (s *SessionUDP) RemoteAddr() net.Addr { return s.raddr }
// ReadFromSessionUDP acts just like net.UDPConn.ReadFrom(), but returns a session object instead of a
@@ -21,9 +23,8 @@ func ReadFromSessionUDP(conn *net.UDPConn, b []byte) (int, *SessionUDP, error) {
return n, session, err
}
-// WriteToSessionUDP acts just like net.UDPConn.WritetTo(), but uses a *SessionUDP instead of a net.Addr.
+// WriteToSessionUDP acts just like net.UDPConn.WriteTo(), but uses a *SessionUDP instead of a net.Addr.
func WriteToSessionUDP(conn *net.UDPConn, b []byte, session *SessionUDP) (int, error) {
n, err := conn.WriteTo(b, session.raddr)
return n, err
}
-