1
0
mirror of https://github.com/golang/go synced 2024-11-20 03:04:40 -07:00

update tree for package net changes

Converted with gofix.

R=adg
CC=golang-dev
https://golang.org/cl/4284049
This commit is contained in:
Russ Cox 2011-03-28 23:28:53 -04:00
parent 41f93a430f
commit 5546cc7eab
11 changed files with 22 additions and 22 deletions

View File

@ -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())

View File

@ -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)
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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

View File

@ -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 {

View File

@ -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

View File

@ -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)
}