summaryrefslogtreecommitdiff
path: root/src/pkg/net/dial.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/net/dial.go')
-rw-r--r--src/pkg/net/dial.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/net/dial.go b/src/pkg/net/dial.go
index 66cb09b19..16896b426 100644
--- a/src/pkg/net/dial.go
+++ b/src/pkg/net/dial.go
@@ -30,7 +30,7 @@ func Dial(net, addr string) (c Conn, err os.Error) {
switch net {
case "tcp", "tcp4", "tcp6":
var ra *TCPAddr
- if ra, err = ResolveTCPAddr(raddr); err != nil {
+ if ra, err = ResolveTCPAddr(net, raddr); err != nil {
goto Error
}
c, err := DialTCP(net, nil, ra)
@@ -40,7 +40,7 @@ func Dial(net, addr string) (c Conn, err os.Error) {
return c, nil
case "udp", "udp4", "udp6":
var ra *UDPAddr
- if ra, err = ResolveUDPAddr(raddr); err != nil {
+ if ra, err = ResolveUDPAddr(net, raddr); err != nil {
goto Error
}
c, err := DialUDP(net, nil, ra)
@@ -83,7 +83,7 @@ func Listen(net, laddr string) (l Listener, err os.Error) {
case "tcp", "tcp4", "tcp6":
var la *TCPAddr
if laddr != "" {
- if la, err = ResolveTCPAddr(laddr); err != nil {
+ if la, err = ResolveTCPAddr(net, laddr); err != nil {
return nil, err
}
}
@@ -116,7 +116,7 @@ func ListenPacket(net, laddr string) (c PacketConn, err os.Error) {
case "udp", "udp4", "udp6":
var la *UDPAddr
if laddr != "" {
- if la, err = ResolveUDPAddr(laddr); err != nil {
+ if la, err = ResolveUDPAddr(net, laddr); err != nil {
return nil, err
}
}