diff options
Diffstat (limited to 'libgo/go/net/net.go')
-rw-r--r-- | libgo/go/net/net.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libgo/go/net/net.go b/libgo/go/net/net.go index 48f0ae7..b236dfd 100644 --- a/libgo/go/net/net.go +++ b/libgo/go/net/net.go @@ -157,6 +157,14 @@ func (e *OpError) Timeout() bool { return ok && t.Timeout() } +type timeoutError struct{} + +func (e *timeoutError) Error() string { return "i/o timeout" } +func (e *timeoutError) Timeout() bool { return true } +func (e *timeoutError) Temporary() bool { return true } + +var errTimeout error = &timeoutError{} + type AddrError struct { Err string Addr string |