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
9773ac1d
Commit
9773ac1d
authored
Sep 20, 2012
by
Mikio Hara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net: fix comment
R=golang-dev, bradfitz CC=golang-dev
https://golang.org/cl/6546044
parent
801f6e63
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
dial.go
src/pkg/net/dial.go
+1
-1
fd_unix.go
src/pkg/net/fd_unix.go
+1
-1
fd_windows.go
src/pkg/net/fd_windows.go
+1
-1
sock_posix.go
src/pkg/net/sock_posix.go
+1
-1
No files found.
src/pkg/net/dial.go
View file @
9773ac1d
...
@@ -81,7 +81,7 @@ func resolveNetAddr(op, net, addr string) (afnet string, a Addr, err error) {
...
@@ -81,7 +81,7 @@ func resolveNetAddr(op, net, addr string) (afnet string, a Addr, err error) {
// Dial("tcp", "google.com:80")
// Dial("tcp", "google.com:80")
// Dial("tcp", "[de:ad:be:ef::ca:fe]:80")
// Dial("tcp", "[de:ad:be:ef::ca:fe]:80")
//
//
// For IP networks,
addr
must be "ip", "ip4" or "ip6" followed
// For IP networks,
net
must be "ip", "ip4" or "ip6" followed
// by a colon and a protocol number or name.
// by a colon and a protocol number or name.
//
//
// Examples:
// Examples:
...
...
src/pkg/net/fd_unix.go
View file @
9773ac1d
...
@@ -582,7 +582,7 @@ func (fd *netFD) accept(toAddr func(syscall.Sockaddr) Addr) (netfd *netFD, err e
...
@@ -582,7 +582,7 @@ func (fd *netFD) accept(toAddr func(syscall.Sockaddr) Addr) (netfd *netFD, err e
}
}
defer
fd
.
decref
()
defer
fd
.
decref
()
// See ../syscall/exec.go for description of ForkLock.
// See ../syscall/exec
_unix
.go for description of ForkLock.
// It is okay to hold the lock across syscall.Accept
// It is okay to hold the lock across syscall.Accept
// because we have put fd.sysfd into non-blocking mode.
// because we have put fd.sysfd into non-blocking mode.
var
s
int
var
s
int
...
...
src/pkg/net/fd_windows.go
View file @
9773ac1d
...
@@ -524,7 +524,7 @@ func (fd *netFD) accept(toAddr func(syscall.Sockaddr) Addr) (*netFD, error) {
...
@@ -524,7 +524,7 @@ func (fd *netFD) accept(toAddr func(syscall.Sockaddr) Addr) (*netFD, error) {
defer
fd
.
decref
()
defer
fd
.
decref
()
// Get new socket.
// Get new socket.
// See ../syscall/exec.go for description of ForkLock.
// See ../syscall/exec
_unix
.go for description of ForkLock.
syscall
.
ForkLock
.
RLock
()
syscall
.
ForkLock
.
RLock
()
s
,
err
:=
syscall
.
Socket
(
fd
.
family
,
fd
.
sotype
,
0
)
s
,
err
:=
syscall
.
Socket
(
fd
.
family
,
fd
.
sotype
,
0
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
src/pkg/net/sock_posix.go
View file @
9773ac1d
...
@@ -17,7 +17,7 @@ var listenerBacklog = maxListenerBacklog()
...
@@ -17,7 +17,7 @@ var listenerBacklog = maxListenerBacklog()
// Generic socket creation.
// Generic socket creation.
func
socket
(
net
string
,
f
,
t
,
p
int
,
ipv6only
bool
,
ulsa
,
ursa
syscall
.
Sockaddr
,
toAddr
func
(
syscall
.
Sockaddr
)
Addr
)
(
fd
*
netFD
,
err
error
)
{
func
socket
(
net
string
,
f
,
t
,
p
int
,
ipv6only
bool
,
ulsa
,
ursa
syscall
.
Sockaddr
,
toAddr
func
(
syscall
.
Sockaddr
)
Addr
)
(
fd
*
netFD
,
err
error
)
{
// See ../syscall/exec.go for description of ForkLock.
// See ../syscall/exec
_unix
.go for description of ForkLock.
syscall
.
ForkLock
.
RLock
()
syscall
.
ForkLock
.
RLock
()
s
,
err
:=
syscall
.
Socket
(
f
,
t
,
p
)
s
,
err
:=
syscall
.
Socket
(
f
,
t
,
p
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
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