summaryrefslogtreecommitdiffstats
path: root/libgo/go/net/net.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/net/net.go')
-rw-r--r--libgo/go/net/net.go16
1 files changed, 14 insertions, 2 deletions
diff --git a/libgo/go/net/net.go b/libgo/go/net/net.go
index 609fee242d0..79d36a2a813 100644
--- a/libgo/go/net/net.go
+++ b/libgo/go/net/net.go
@@ -23,12 +23,12 @@ type Addr interface {
// Conn is a generic stream-oriented network connection.
type Conn interface {
// Read reads data from the connection.
- // Read can be made to time out and return a net.Error with Timeout() == true
+ // Read can be made to time out and return a Error with Timeout() == true
// after a fixed time limit; see SetDeadline and SetReadDeadline.
Read(b []byte) (n int, err error)
// Write writes data to the connection.
- // Write can be made to time out and return a net.Error with Timeout() == true
+ // Write can be made to time out and return a Error with Timeout() == true
// after a fixed time limit; see SetDeadline and SetWriteDeadline.
Write(b []byte) (n int, err error)
@@ -201,3 +201,15 @@ type UnknownNetworkError string
func (e UnknownNetworkError) Error() string { return "unknown network " + string(e) }
func (e UnknownNetworkError) Temporary() bool { return false }
func (e UnknownNetworkError) Timeout() bool { return false }
+
+// DNSConfigError represents an error reading the machine's DNS configuration.
+type DNSConfigError struct {
+ Err error
+}
+
+func (e *DNSConfigError) Error() string {
+ return "error reading DNS config: " + e.Err.Error()
+}
+
+func (e *DNSConfigError) Timeout() bool { return false }
+func (e *DNSConfigError) Temporary() bool { return false }
OpenPOWER on IntegriCloud