]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: make windows Errno implement net.Error (fix build)
authorRuss Cox <rsc@golang.org>
Mon, 14 Nov 2011 06:21:38 +0000 (01:21 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 14 Nov 2011 06:21:38 +0000 (01:21 -0500)
TBR=brainman
CC=golang-dev
https://golang.org/cl/5371086

src/pkg/syscall/dll_windows.go

index 461ce3f099545ba4c87e264a770393110fe6bf6a..c6acdfce2c35e6c35d314b875e6e6b74fde1f4b7 100644 (file)
@@ -15,6 +15,14 @@ func (e Errno) Error() string {
        return errstr(e)
 }
 
+func (e Errno) Temporary() bool {
+       return e == EINTR || e == EMFILE || e.Timeout()
+}
+
+func (e Errno) Timeout() bool {
+       return e == EAGAIN || e == EWOULDBLOCK || e == ETIMEDOUT
+}
+
 // DLLError describes reasons for DLL load failures.
 type DLLError struct {
        Err     error