Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
5546cc7e
Commit
5546cc7e
authored
Mar 29, 2011
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update tree for package net changes
Converted with gofix. R=adg CC=golang-dev
https://golang.org/cl/4284049
parent
41f93a43
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
22 additions
and
22 deletions
+22
-22
conn.go
src/pkg/exp/draw/x11/conn.go
+3
-3
serve_test.go
src/pkg/http/serve_test.go
+4
-4
transport.go
src/pkg/http/transport.go
+1
-1
import.go
src/pkg/netchan/import.go
+1
-1
client.go
src/pkg/rpc/client.go
+2
-2
client.go
src/pkg/rpc/jsonrpc/client.go
+1
-1
smtp.go
src/pkg/smtp/smtp.go
+1
-1
syslog.go
src/pkg/syslog/syslog.go
+1
-1
syslog_unix.go
src/pkg/syslog/syslog_unix.go
+1
-1
client.go
src/pkg/websocket/client.go
+2
-2
websocket_test.go
src/pkg/websocket/websocket_test.go
+5
-5
No files found.
src/pkg/exp/draw/x11/conn.go
View file @
5546cc7e
...
...
@@ -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
())
...
...
src/pkg/http/serve_test.go
View file @
5546cc7e
...
...
@@ -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
)
}
...
...
src/pkg/http/transport.go
View file @
5546cc7e
...
...
@@ -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
}
...
...
src/pkg/netchan/import.go
View file @
5546cc7e
...
...
@@ -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
}
...
...
src/pkg/rpc/client.go
View file @
5546cc7e
...
...
@@ -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
}
...
...
src/pkg/rpc/jsonrpc/client.go
View file @
5546cc7e
...
...
@@ -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
}
...
...
src/pkg/smtp/smtp.go
View file @
5546cc7e
...
...
@@ -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
}
...
...
src/pkg/syslog/syslog.go
View file @
5546cc7e
...
...
@@ -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
...
...
src/pkg/syslog/syslog_unix.go
View file @
5546cc7e
...
...
@@ -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
{
...
...
src/pkg/websocket/client.go
View file @
5546cc7e
...
...
@@ -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
...
...
src/pkg/websocket/websocket_test.go
View file @
5546cc7e
...
...
@@ -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
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment