net: implement windows timeout

R=brainman, rsc
CC=golang-dev
https://golang.org/cl/1731047
This commit is contained in:
Wei Guangjing 2011-01-19 14:49:25 -05:00 committed by Russ Cox
parent 30c85bf14c
commit ff25900bb6
4 changed files with 141 additions and 19 deletions

View file

@ -8,14 +8,9 @@ import (
"os"
"testing"
"time"
"runtime"
)
func testTimeout(t *testing.T, network, addr string, readFrom bool) {
// Timeouts are not implemented on windows.
if runtime.GOOS == "windows" {
return
}
fd, err := Dial(network, "", addr)
if err != nil {
t.Errorf("dial %s %s failed: %v", network, addr, err)