OLD | NEW |
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 | 4 |
| 5 // +build darwin freebsd linux openbsd |
| 6 |
5 package net | 7 package net |
6 | 8 |
7 import ( | 9 import ( |
8 "io" | 10 "io" |
9 "os" | 11 "os" |
10 "sync" | 12 "sync" |
11 "syscall" | 13 "syscall" |
12 "time" | 14 "time" |
13 ) | 15 ) |
14 | 16 |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 if e = syscall.SetNonblock(ns, false); e != 0 { | 638 if e = syscall.SetNonblock(ns, false); e != 0 { |
637 return nil, &OpError{"setnonblock", fd.net, fd.laddr, os.Errno(e
)} | 639 return nil, &OpError{"setnonblock", fd.net, fd.laddr, os.Errno(e
)} |
638 } | 640 } |
639 | 641 |
640 return os.NewFile(ns, fd.sysfile.Name()), nil | 642 return os.NewFile(ns, fd.sysfile.Name()), nil |
641 } | 643 } |
642 | 644 |
643 func closesocket(s int) (errno int) { | 645 func closesocket(s int) (errno int) { |
644 return syscall.Close(s) | 646 return syscall.Close(s) |
645 } | 647 } |
OLD | NEW |