1
0
mirror of https://github.com/golang/go synced 2024-11-25 09:17:57 -07:00

net: fix Windows build

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5505048
This commit is contained in:
Brad Fitzpatrick 2011-12-20 14:32:33 -08:00
parent a41006f35a
commit 01507b9ad1
2 changed files with 8 additions and 8 deletions

View File

@ -377,14 +377,6 @@ func (fd *netFD) CloseWrite() error {
return fd.shutdown(syscall.SHUT_WR)
}
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{}
func (fd *netFD) Read(p []byte) (n int, err error) {
if fd == nil {
return 0, os.EINVAL

View File

@ -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