LEFT | RIGHT |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
| 4 |
| 5 // +build none |
4 | 6 |
5 package net | 7 package net |
6 | 8 |
7 import ( | 9 import ( |
8 //"fmt" | 10 //"fmt" |
9 "errors" | 11 "errors" |
10 "io" | 12 "io" |
11 "os" | 13 "os" |
12 "sync" | 14 "sync" |
13 "syscall" | 15 "syscall" |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 if err = syscall.SetNonblock(ns, false); err != nil { | 504 if err = syscall.SetNonblock(ns, false); err != nil { |
503 return nil, &OpError{"setnonblock", fd.net, fd.laddr, err} | 505 return nil, &OpError{"setnonblock", fd.net, fd.laddr, err} |
504 } | 506 } |
505 | 507 |
506 return os.NewFile(uintptr(ns), fd.sysfile.Name()), nil | 508 return os.NewFile(uintptr(ns), fd.sysfile.Name()), nil |
507 } | 509 } |
508 | 510 |
509 func closesocket(s int) error { | 511 func closesocket(s int) error { |
510 return syscall.Close(s) | 512 return syscall.Close(s) |
511 } | 513 } |
LEFT | RIGHT |