Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(266)

Issue 957045: code review 957045: net: introduce net.Error interface (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 12 months ago by rsc
Modified:
13 years, 12 months ago
Reviewers:
CC:
r, golang-dev, msolo
Visibility:
Public.

Description

net: introduce net.Error interface Adds two more methods, Timeout and Temporary. Implemented by os.Errno too. The intent is to make the checks for os.EAGAIN a little less clunky. It should also let us clean up a bug that Mike Solomon pointed out: if a network server gets an "out of file descriptors" error from Accept, the listener should not stop. It will be able to check this because that error would have Temporary() == true. Also clean up some underscore names. Fixes issue 442.

Patch Set 1 #

Patch Set 2 : code review 957045: net: introduce net.Error interface #

Patch Set 3 : code review 957045: net: introduce net.Error interface #

Patch Set 4 : code review 957045: net: introduce net.Error interface #

Patch Set 5 : code review 957045: net: introduce net.Error interface #

Patch Set 6 : code review 957045: net: introduce net.Error interface #

Unified diffs Side-by-side diffs Delta from patch set Stats (+347 lines, -315 lines) Patch
M src/pkg/net/dnsclient.go View 1 2 3 7 chunks +38 lines, -41 lines 0 comments Download
M src/pkg/net/dnsconfig.go View 1 2 3 2 chunks +17 lines, -5 lines 0 comments Download
M src/pkg/net/dnsmsg.go View 1 14 chunks +114 lines, -114 lines 0 comments Download
M src/pkg/net/fd.go View 1 2 3 9 chunks +43 lines, -23 lines 0 comments Download
M src/pkg/net/ipsock.go View 1 2 3 7 chunks +15 lines, -7 lines 0 comments Download
M src/pkg/net/net.go View 1 2 3 6 chunks +58 lines, -14 lines 0 comments Download
M src/pkg/net/server_test.go View 1 2 3 2 chunks +6 lines, -6 lines 0 comments Download
M src/pkg/net/tcpsock.go View 1 2 3 5 chunks +5 lines, -18 lines 0 comments Download
M src/pkg/net/timeout_test.go View 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/net/udpsock.go View 1 2 3 8 chunks +15 lines, -38 lines 0 comments Download
M src/pkg/net/unixsock.go View 1 2 3 14 chunks +23 lines, -46 lines 0 comments Download
M src/pkg/os/error.go View 1 2 3 2 chunks +11 lines, -1 line 0 comments Download

Messages

Total messages: 8
rsc
Hello r (cc: golang-dev@googlegroups.com, msolo@gmail.com), I'd like you to review this change.
13 years, 12 months ago (2010-04-25 00:50:07 UTC) #1
r
LGTM
13 years, 12 months ago (2010-04-25 01:01:45 UTC) #2
rsc
I'm going to sit on this for the weekend. I think it might make sense ...
13 years, 12 months ago (2010-04-25 01:12:22 UTC) #3
r2
yes. i thought the plan was always to return the generic type and type-switch if ...
13 years, 12 months ago (2010-04-25 02:28:31 UTC) #4
rsc
PTAL Everything is statically typed to os.Error again.
13 years, 12 months ago (2010-04-25 23:41:22 UTC) #5
rsc
Do you want to look again (the "3" link on http://codereview.appspot.com/957045/show)? Mostly just lots of ...
13 years, 12 months ago (2010-04-26 17:39:19 UTC) #6
r
LGTM
13 years, 12 months ago (2010-04-26 18:35:10 UTC) #7
rsc
13 years, 12 months ago (2010-04-27 05:15:32 UTC) #8
*** Submitted as http://code.google.com/p/go/source/detail?r=f0e8b341ca6d ***

net: introduce net.Error interface

Adds two more methods, Timeout and Temporary.
Implemented by os.Errno too.  The intent is to make
the checks for os.EAGAIN a little less clunky.
It should also let us clean up a bug that Mike Solomon
pointed out: if a network server gets an "out of file descriptors"
error from Accept, the listener should not stop.
It will be able to check this because that error would
have Temporary() == true.

Also clean up some underscore names.

Fixes issue 442.

R=r
CC=golang-dev, msolo
http://codereview.appspot.com/957045
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b