aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/net/udpsock_posix.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/net/udpsock_posix.go')
-rw-r--r--libgo/go/net/udpsock_posix.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgo/go/net/udpsock_posix.go b/libgo/go/net/udpsock_posix.go
index 4924801..72aadca 100644
--- a/libgo/go/net/udpsock_posix.go
+++ b/libgo/go/net/udpsock_posix.go
@@ -38,6 +38,10 @@ func (a *UDPAddr) sockaddr(family int) (syscall.Sockaddr, error) {
return ipToSockaddr(family, a.IP, a.Port, a.Zone)
}
+func (a *UDPAddr) toLocal(net string) sockaddr {
+ return &UDPAddr{loopbackIP(net), a.Port, a.Zone}
+}
+
func (c *UDPConn) readFrom(b []byte) (int, *UDPAddr, error) {
var addr *UDPAddr
n, sa, err := c.fd.readFrom(b)