Commit 5546cc7e authored by Russ Cox's avatar Russ Cox

update tree for package net changes

Converted with gofix.

R=adg
CC=golang-dev
https://golang.org/cl/4284049
parent 41f93a43
......@@ -286,11 +286,11 @@ func connect(display string) (conn net.Conn, displayStr string, err os.Error) {
}
// Make the connection.
if socket != "" {
conn, err = net.Dial("unix", "", socket+":"+displayStr)
conn, err = net.Dial("unix", socket+":"+displayStr)
} else if host != "" {
conn, err = net.Dial(protocol, "", host+":"+strconv.Itoa(6000+displayInt))
conn, err = net.Dial(protocol, host+":"+strconv.Itoa(6000+displayInt))
} else {
conn, err = net.Dial("unix", "", "/tmp/.X11-unix/X"+displayStr)
conn, err = net.Dial("unix", "/tmp/.X11-unix/X"+displayStr)
}
if err != nil {
return nil, "", os.NewError("cannot connect to " + display + ": " + err.String())
......
......@@ -175,7 +175,7 @@ func TestHostHandlers(t *testing.T) {
ts := httptest.NewServer(nil)
defer ts.Close()
conn, err := net.Dial("tcp", "", ts.Listener.Addr().String())
conn, err := net.Dial("tcp", ts.Listener.Addr().String())
if err != nil {
t.Fatal(err)
}
......@@ -265,7 +265,7 @@ func TestServerTimeouts(t *testing.T) {
// Slow client that should timeout.
t1 := time.Nanoseconds()
conn, err := net.Dial("tcp", "", fmt.Sprintf("localhost:%d", addr.Port))
conn, err := net.Dial("tcp", fmt.Sprintf("localhost:%d", addr.Port))
if err != nil {
t.Fatalf("Dial: %v", err)
}
......@@ -348,7 +348,7 @@ func TestIdentityResponse(t *testing.T) {
}
// Verify that the connection is closed when the declared Content-Length
// is larger than what the handler wrote.
conn, err := net.Dial("tcp", "", ts.Listener.Addr().String())
conn, err := net.Dial("tcp", ts.Listener.Addr().String())
if err != nil {
t.Fatalf("error dialing: %v", err)
}
......@@ -377,7 +377,7 @@ func TestServeHTTP10Close(t *testing.T) {
}))
defer s.Close()
conn, err := net.Dial("tcp", "", s.Listener.Addr().String())
conn, err := net.Dial("tcp", s.Listener.Addr().String())
if err != nil {
t.Fatal("dial error:", err)
}
......
......@@ -195,7 +195,7 @@ func (t *Transport) getConn(cm *connectMethod) (*persistConn, os.Error) {
return pc, nil
}
conn, err := net.Dial("tcp", "", cm.addr())
conn, err := net.Dial("tcp", cm.addr())
if err != nil {
return nil, err
}
......
......@@ -48,7 +48,7 @@ func NewImporter(conn io.ReadWriter) *Importer {
// Import imports a set of channels from the given network and address.
func Import(network, remoteaddr string) (*Importer, os.Error) {
conn, err := net.Dial(network, "", remoteaddr)
conn, err := net.Dial(network, remoteaddr)
if err != nil {
return nil, err
}
......
......@@ -208,7 +208,7 @@ func DialHTTP(network, address string) (*Client, os.Error) {
// at the specified network address and path.
func DialHTTPPath(network, address, path string) (*Client, os.Error) {
var err os.Error
conn, err := net.Dial(network, "", address)
conn, err := net.Dial(network, address)
if err != nil {
return nil, err
}
......@@ -229,7 +229,7 @@ func DialHTTPPath(network, address, path string) (*Client, os.Error) {
// Dial connects to an RPC server at the specified network address.
func Dial(network, address string) (*Client, os.Error) {
conn, err := net.Dial(network, "", address)
conn, err := net.Dial(network, address)
if err != nil {
return nil, err
}
......
......@@ -116,7 +116,7 @@ func NewClient(conn io.ReadWriteCloser) *rpc.Client {
// Dial connects to a JSON-RPC server at the specified network address.
func Dial(network, address string) (*rpc.Client, os.Error) {
conn, err := net.Dial(network, "", address)
conn, err := net.Dial(network, address)
if err != nil {
return nil, err
}
......
......@@ -39,7 +39,7 @@ type Client struct {
// Dial returns a new Client connected to an SMTP server at addr.
func Dial(addr string) (*Client, os.Error) {
conn, err := net.Dial("tcp", "", addr)
conn, err := net.Dial("tcp", addr)
if err != nil {
return nil, err
}
......
......@@ -67,7 +67,7 @@ func Dial(network, raddr string, priority Priority, prefix string) (w *Writer, e
conn, err = unixSyslog()
} else {
var c net.Conn
c, err = net.Dial(network, "", raddr)
c, err = net.Dial(network, raddr)
conn = netConn{c}
}
return &Writer{priority, prefix, conn}, err
......
......@@ -19,7 +19,7 @@ func unixSyslog() (conn serverConn, err os.Error) {
for _, network := range logTypes {
for _, path := range logPaths {
raddr = path
conn, err := net.Dial(network, "", raddr)
conn, err := net.Dial(network, raddr)
if err != nil {
continue
} else {
......
......@@ -108,10 +108,10 @@ func Dial(url, protocol, origin string) (ws *Conn, err os.Error) {
switch parsedUrl.Scheme {
case "ws":
client, err = net.Dial("tcp", "", parsedUrl.Host)
client, err = net.Dial("tcp", parsedUrl.Host)
case "wss":
client, err = tls.Dial("tcp", "", parsedUrl.Host, nil)
client, err = tls.Dial("tcp", parsedUrl.Host, nil)
default:
err = ErrBadScheme
......
......@@ -53,7 +53,7 @@ func TestEcho(t *testing.T) {
once.Do(startServer)
// websocket.Dial()
client, err := net.Dial("tcp", "", serverAddr)
client, err := net.Dial("tcp", serverAddr)
if err != nil {
t.Fatal("dialing", err)
}
......@@ -84,7 +84,7 @@ func TestEchoDraft75(t *testing.T) {
once.Do(startServer)
// websocket.Dial()
client, err := net.Dial("tcp", "", serverAddr)
client, err := net.Dial("tcp", serverAddr)
if err != nil {
t.Fatal("dialing", err)
}
......@@ -114,7 +114,7 @@ func TestEchoDraft75(t *testing.T) {
func TestWithQuery(t *testing.T) {
once.Do(startServer)
client, err := net.Dial("tcp", "", serverAddr)
client, err := net.Dial("tcp", serverAddr)
if err != nil {
t.Fatal("dialing", err)
}
......@@ -131,7 +131,7 @@ func TestWithQuery(t *testing.T) {
func TestWithProtocol(t *testing.T) {
once.Do(startServer)
client, err := net.Dial("tcp", "", serverAddr)
client, err := net.Dial("tcp", serverAddr)
if err != nil {
t.Fatal("dialing", err)
}
......@@ -200,7 +200,7 @@ func TestSmallBuffer(t *testing.T) {
once.Do(startServer)
// websocket.Dial()
client, err := net.Dial("tcp", "", serverAddr)
client, err := net.Dial("tcp", serverAddr)
if err != nil {
t.Fatal("dialing", err)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment