FAQ
Reviewers: golang-dev_googlegroups.com,

Message:
Hello golang-dev@googlegroups.com,

I'd like you to review this change to
https://code.google.com/p/go/


Description:
net.Conn: document that File().Fd() is not for changing socket options.

Fixes issue 2458.

Please review this at https://codereview.appspot.com/6869054/

Affected files:
M src/pkg/net/net.go


Index: src/pkg/net/net.go
===================================================================
--- a/src/pkg/net/net.go
+++ b/src/pkg/net/net.go
@@ -199,6 +199,9 @@
// 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 c does not affect f, and closing f does not affect c.
+//
+// The file descriptor associated with the returned os.File should not
+// be used to modify socket options. Doing so may lead to unexpected
errors.
func (c *conn) File() (f *os.File, err error) { return c.fd.dup() }

// An Error represents a network error.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedDec 4, '12 at 1:54a
activeDec 4, '12 at 1:46p
posts4
users2
websitegolang.org

2 users in discussion

Mikioh Mikioh: 2 posts Rickarnoldjr: 2 posts

People

Translate

site design / logo © 2022 Grokbase