diff options
author | Michael Stapelberg <stapelberg@debian.org> | 2013-05-14 18:39:35 +0200 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2013-05-14 18:39:35 +0200 |
commit | efcc50dfdc94c82ee0292bf71992ecb7c0123061 (patch) | |
tree | 17dca99d1dc7fc4e9fe49c2cf6a99d337d4c039f /src/pkg/net/tcpsock_plan9.go | |
parent | 04b08da9af0c450d645ab7389d1467308cfc2db8 (diff) | |
download | golang-efcc50dfdc94c82ee0292bf71992ecb7c0123061.tar.gz |
Imported Upstream version 1.1upstream/1.1
Diffstat (limited to 'src/pkg/net/tcpsock_plan9.go')
-rw-r--r-- | src/pkg/net/tcpsock_plan9.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/pkg/net/tcpsock_plan9.go b/src/pkg/net/tcpsock_plan9.go index ed3664603..48334fed7 100644 --- a/src/pkg/net/tcpsock_plan9.go +++ b/src/pkg/net/tcpsock_plan9.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// TCP sockets for Plan 9 - package net import ( @@ -161,12 +159,16 @@ 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 // listener. Net must be "tcp", "tcp4", or "tcp6". If laddr has a -// port of 0, it means to listen on some available port. The caller -// can use l.Addr() to retrieve the chosen address. +// port of 0, ListenTCP will choose an available port. The caller can +// use the Addr method of TCPListener to retrieve the chosen address. func ListenTCP(net string, laddr *TCPAddr) (*TCPListener, error) { switch net { case "tcp", "tcp4", "tcp6": |