]> Cypherpunks repositories - gostls13.git/commit
net: introduce net.Error interface
authorRuss Cox <rsc@golang.org>
Tue, 27 Apr 2010 05:15:25 +0000 (22:15 -0700)
committerRuss Cox <rsc@golang.org>
Tue, 27 Apr 2010 05:15:25 +0000 (22:15 -0700)
commit47a05334117db4f1e9df6be8aeef9598d7a07124
tree30f65329b476e4abb1423b9469ebd89828877287
parentcd5191fd30373035176c0585453fa40d1443c2d2
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 #442.

R=r
CC=golang-dev, msolo
https://golang.org/cl/957045
12 files changed:
src/pkg/net/dnsclient.go
src/pkg/net/dnsconfig.go
src/pkg/net/dnsmsg.go
src/pkg/net/fd.go
src/pkg/net/ipsock.go
src/pkg/net/net.go
src/pkg/net/server_test.go
src/pkg/net/tcpsock.go
src/pkg/net/timeout_test.go
src/pkg/net/udpsock.go
src/pkg/net/unixsock.go
src/pkg/os/error.go