Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
73417e40
Commit
73417e40
authored
Apr 24, 2013
by
Mikio Hara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net: add missing File method document
R=golang-dev, bradfitz, r CC=golang-dev
https://golang.org/cl/8698049
parent
d33f09bc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
0 deletions
+16
-0
src/pkg/net/tcpsock_plan9.go
src/pkg/net/tcpsock_plan9.go
+4
-0
src/pkg/net/tcpsock_posix.go
src/pkg/net/tcpsock_posix.go
+4
-0
src/pkg/net/unixsock_plan9.go
src/pkg/net/unixsock_plan9.go
+4
-0
src/pkg/net/unixsock_posix.go
src/pkg/net/unixsock_posix.go
+4
-0
No files found.
src/pkg/net/tcpsock_plan9.go
View file @
73417e40
...
...
@@ -159,6 +159,10 @@ func (l *TCPListener) SetDeadline(t time.Time) error {
// File returns a copy of the underlying os.File, set to blocking
// mode. It is the caller's responsibility to close f when finished.
// Closing l does not affect f, and closing f does not affect l.
//
// The returned os.File's file descriptor is different from the
// connection's. Attempting to change properties of the original
// using this duplicate may or may not have the desired effect.
func
(
l
*
TCPListener
)
File
()
(
f
*
os
.
File
,
err
error
)
{
return
l
.
dup
()
}
// ListenTCP announces on the TCP address laddr and returns a TCP
...
...
src/pkg/net/tcpsock_posix.go
View file @
73417e40
...
...
@@ -267,6 +267,10 @@ func (l *TCPListener) SetDeadline(t time.Time) error {
// File returns a copy of the underlying os.File, set to blocking
// mode. It is the caller's responsibility to close f when finished.
// Closing l does not affect f, and closing f does not affect l.
//
// The returned os.File's file descriptor is different from the
// connection's. Attempting to change properties of the original
// using this duplicate may or may not have the desired effect.
func
(
l
*
TCPListener
)
File
()
(
f
*
os
.
File
,
err
error
)
{
return
l
.
fd
.
dup
()
}
// ListenTCP announces on the TCP address laddr and returns a TCP
...
...
src/pkg/net/unixsock_plan9.go
View file @
73417e40
...
...
@@ -126,6 +126,10 @@ func (l *UnixListener) SetDeadline(t time.Time) error {
// File returns a copy of the underlying os.File, set to blocking
// mode. It is the caller's responsibility to close f when finished.
// Closing l does not affect f, and closing f does not affect l.
//
// The returned os.File's file descriptor is different from the
// connection's. Attempting to change properties of the original
// using this duplicate may or may not have the desired effect.
func
(
l
*
UnixListener
)
File
()
(
*
os
.
File
,
error
)
{
return
nil
,
syscall
.
EPLAN9
}
...
...
src/pkg/net/unixsock_posix.go
View file @
73417e40
...
...
@@ -339,6 +339,10 @@ func (l *UnixListener) SetDeadline(t time.Time) (err error) {
// File returns a copy of the underlying os.File, set to blocking
// mode. It is the caller's responsibility to close f when finished.
// Closing l does not affect f, and closing f does not affect l.
//
// The returned os.File's file descriptor is different from the
// connection's. Attempting to change properties of the original
// using this duplicate may or may not have the desired effect.
func
(
l
*
UnixListener
)
File
()
(
f
*
os
.
File
,
err
error
)
{
return
l
.
fd
.
dup
()
}
// ListenUnixgram listens for incoming Unix datagram packets addressed
...
...
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